Solved

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: https://gyazo.com/33f91446c8fbe62ce0d7adf4de76caed
Second Picture: https://gyazo.com/64cb817db8dbeec8a30c459cd3c17285
1 answer Last reply Best Answer
More about autorunning program usb
  1. Best answer
    https://www.youtube.com/watch?v=BLjAT1jMBA8
    or
    http://www.samlogic.net/articles/autoplay-autorun-windows-10.htm


    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