Windows 10: Autorun a batch-file
Is there a way to autorun a batch file which is on a usb stick? When the usb is inserted into the computer, then the batch-file should be executed without typing or clicking on anything.
I've created a autorun.inf on the usb. But the batch-file didn't run automatically.
41 Answer
Windows 10 does not allow this option any more, because of security. You now need a third-party product for making it work.
One such product isUSB Drive Letter Manager (USBDLM), which is free for personal and educational use.
You need to create a file named USBDLM.ini in the program’s folder
(or rename the sample file) and add an entry with AutoRunInf=1 under [Settings]:
[Settings]
AutoRunInf=1You may then create the autorun.inf file on the device.
For more info:How to Make Windows Autorun USB Flash Drives.
Note that this will make your computer vulnerable to autorun infections. Luckily these are now almost extinct after Microsoft disabled Autorun, but beware of using older media which might still be infected.