Help with AutoRunning a program from USB

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.

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:
Second Picture:
1 answer Last reply Best Answer
More about autorunning program usb
  1. Best answer

    I would not do this. I would open the folder automatically to view the files but click manually on the BAT file as to autorun on insertion is a security risk.

    Within the script on the USB disk you don't need the drive letter only the relative path should be needed.
Ask a new question

Read More

windows 10 Programming Minecraft USB