[英]How to make my script auto-run when a USB is plugged in?
I have the following python file in my usb:我的 USB 中有以下 python 文件:
Game.py
I want to make it run automatically when I plug in the USB.我想让它在插入 USB 时自动运行。
I wrote the following in notepad:我在记事本中写了以下内容:
[autorun]
shellexecute=Game.py
action=MyProgram Open Program
and saved it as autorun.inf
.并将其保存为
autorun.inf
。
But it does not run and my computer displays:但它没有运行,我的电脑显示:
There is a problem with this drive.
这个驱动有问题。 Scan and fix it now?
现在扫描并修复它?
Whats wrong and how can I fix this?出了什么问题,我该如何解决?
Note:笔记:
I am using Windows 10.我正在使用 Windows 10。
hi i am a beginner myself but this should do the trick嗨,我自己是初学者,但这应该可以解决问题
[autorun]
;Open=YOURAPP.exe
ShellExecute=YOURAPP.exe
UseAutoPlay=1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.