Help with AutoRunning a program from USB

AzoraFred

Reputable
Apr 19, 2015
47
0
4,530
Is there a way I can autorun a program from a USB when I plug it in?? I have a portable installation of Minecraft and wanted the launcher.bat to run automatically when I plugged it in. I'll include pictures of what the folders look like.
33f91446c8fbe62ce0d7adf4de76caed
64cb817db8dbeec8a30c459cd3c17285


Also, the drive letter will change depending on the computer it is plugged into. I believe the launcher.bat file bypassed this by using "%CD%" to target the specific USB it was running from. I don't exactly know, but some input would help.

First Picture: https://gyazo.com/33f91446c8fbe62ce0d7adf4de76caed
Second Picture: https://gyazo.com/64cb817db8dbeec8a30c459cd3c17285