在 Windows 10 中自动运行 USB?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/46270274/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 19:56:53  来源:igfitidea点击:

Autorun USB in Windows 10?

windowsusbautorun

提问by NotCrunchyTaco

How could I get an autorun USB drive in Windows 7/8/10. autorun.inf doesn't seem to work anymore. Also could this work without any rubber duckie USB drives? Maybe trick windows into thinking it is a DVD or CD to autorun?

如何在 Windows 7/8/10 中获得自动运行的 USB 驱动器。autorun.inf 似乎不再起作用了。如果没有任何橡皮鸭 USB 驱动器,这也可以工作吗?也许诱使 Windows 认为它​​是自动运行的 DVD 或 CD?

回答by Alex5794

Yes, there is a way,

是的,有办法,

to do this you have to convert your USB into "NTFS" normally its "FAT32" To do this, find your USB drive on your computer https://i.stack.imgur.com/DkFOK.png-- Image (just my USB drive) Then right-click on that USB drive. Then click on "Change Format" or "Format" https://i.stack.imgur.com/42yLK.png-- Picture of that. Then click and change it to "NTFS" instead of "FAT32" https://i.stack.imgur.com/ziA67.png-- And another picture of that. Then all you have to do from here is making a regular autorun.inf file and it will autorun whatever you desire, and it even works without the permission from "AutoPlay" Have fun :)

为此,您必须将 USB 转换为“NTFS”,通常为“FAT32”。为此,请在您的计算机上找到您的 USB 驱动器 https://i.stack.imgur.com/DkFOK.png-- 图片(只是我的USB 驱动器)然后右键单击该 USB 驱动器。然后单击“更改格式”或“格式” https://i.stack.imgur.com/42yLK.png- 图片。然后单击并将其更改为“NTFS”而不是“FAT32” https://i.stack.imgur.com/ziA67.png——还有另一张图片。然后你要做的就是制作一个常规的 autorun.inf 文件,它会自动运行你想要的任何东西,它甚至可以在没有“自动播放”许可的情况下工作,玩得开心:)

回答by Derek John Scott

you might need to change a windows registry entry to allow media to be run automatically so that the autorun.inf file can be executed once the device is plugged in

您可能需要更改 Windows 注册表项以允许媒体自动运行,以便在插入设备后可以执行 autorun.inf 文件

[autorun]
Icon=lock.ico
Label=Payroll Information
;Open=FetchSalariesDB.EXE
ShellExecute=FetchSalariesDB.EXE
UseAutoPlay=1