How do I make an Auto-run program with batch?

January 29, 2014 at 17:02:11
Specs: Windows 8, Unneeded
I Want my batch game to start Instantly when My USB is put in a computer so nobody has to search through the files to open it. It would ruin the magic otherwise (The Auto-run is a separate file).

See More: How do I make an Auto-run program with batch?

Report •

February 28, 2014 at 05:21:12
In order to help prevent malware from spreading using the AutoRun mechanism, Microsoft made an important change, starting with Windows 7. AutoPlay no longer supports the AutoRun functionality for non-optical removable media. In other words, AutoPlay still works for CD/DVDs but not for work for USB drives.

so for windows 8, it is unlikely to AutoPlay a USB. There are options for earlier versions of windows.

you could make the rest of the files on the USB invisible and have one file start.bat, people could see, and in that bat file type start d:\file\file.exe

message edited by mikelinus

Report •

March 7, 2014 at 15:12:30

Report •

March 8, 2014 at 06:43:13
Enter the like into a text file and save as autoplay.inf

open=setup.exe <--note that this must be an exe file, as a bat file will not run here(as far as I know)
icon= icon.ico <--your icon file if you have one.


Report •

Related Solutions

March 10, 2014 at 07:51:27
Use shellexecute instead of open, and you can.

How To Ask Questions The Smart Way

Report •

Ask Question