在Windows 10中连接USB时自动打开记事本

时间:2018-07-27 07:39:31

标签: windows-10 usb autorun

当用户在Windows 10中将USB驱动器连接到计算机时,我需要打开记事本。我使用的是autorun.inf文件,其中包含以下代码:

[autorun]
ShellExecute=notepad.exe

代码在执行上述文件时出现以下错误:

enter image description here

谢谢您的帮助。

1 个答案:

答案 0 :(得分:0)

USB自动运行功能在win7上不再可用,但我认为它仍然可以在CD和DVD上运行。将您的autorun.inf和程序放在CD上,以查看其是否有效。 使用open = filename或shellexecute = filename