简体   繁体   English

在Mac 10.6 / 7/8 / Windows XP / Vista / 7上自动打开USB驱动器

[英]Auto Open USB Drive on Mac 10.6/7/8/Windows XP/Vista/7

I'm creating a FAT32 formatted USB Stick/Drive to ship a product. 我正在创建FAT32格式的USB记忆棒/驱动器,以运送产品。 We'd like it to behave a bit more like the hybrid CD/DVD's that we create: 我们希望它的行为更像我们创建的混合CD / DVD:

  1. Insert the disk on Mac 10.6 or later and the drive opens up and shows you a window with the application in it. 将磁盘插入Mac 10.6或更高版本,驱动器将打开并显示一个包含应用程序的窗口。 We can do it from a DMG or CD but the USB drive doesn't seem to want to honor the bless command. 我们可以从DMG或CD上执行此操作,但USB驱动器似乎不想遵守bless命令。

  2. On Windows, we've set up an autorun.inf. 在Windows上,我们设置了一个autorun.inf。 On XP it's not showing the icon, label, or opening the specified file. 在XP上,它不显示图标,标签或打开指定的文件。 I know that you can't have Windows Vista and Windows 7 automatically open something or add an entry to the AutoPlay list by default, but it still should show the Volume Label and icon. 我知道您无法让Windows Vista和Windows 7默认情况下自动打开某些内容或在“自动播放”列表中添加一个条目,但是它仍应显示“卷标”和图标。

Here is my autorun.inf: 这是我的autorun.inf:

[AutoRun]
Action="Install My Cool App"
Open="InstallThis.exe"
icon="Ultimate.ico"

[Content]
MusicFiles=false
PictureFiles=false
VideoFiles=false

Are these things too much to ask for a USB stick? 这些东西是否足以要求USB记忆棒? Anyone else out there shipping things on a USB flash drive and have overcome these issues? 还有其他人可以通过USB闪存驱动器运送东西并克服这些问题吗?

As of Windows 7, AutoRun feature is not supported on USB drives. 从Windows 7开始,USB驱动器不支持自动运行功能。 Only the following commands are supported: 仅支持以下命令:

  • label 标签
  • icon 图标

See Improvements to AutoPlay on Engineering Windows 7 blog. 请参阅Engineering Windows 7博客上AutoPlay的改进

Examples in Autorun.inf Entries do not use quotes for values. Autorun.inf条目中的示例不使用引号作为值。 Does it work without the quotes? 它不带引号是否有效?


MacOS might have implemented a similar approach to Windows 7: do not autorun anything from a flash drive automatically to protect you from malware. MacOS可能已实现了与Windows 7类似的方法:不要自动运行闪存驱动器中的任何内容以保护您免受恶意软件的侵害。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM