Instructables

flash drive autorun for vista and xp to launch app of choice?

I currently run one app that is launched from a flash drive by an autorun.inf file. It works great for vista because it launches the task menu and I just launch the program. What I am trying to accomplish is create a simplistic program or group of programs using either the autorun inf or a .bat file to give me the option to launch the app of choice, needs to work on both vista and xp any help coding would be greatly appreciated.

P.S. this is the code that Im currently using

[Autorun]
Open=apps\(insert application here).exe

Prodigity5 years ago
Here is a simple batch program which should do the job:

@echo off
echo -- Menu --
echo 1. GIMP
echo 2. Solitaire
echo 3. Paint
echo 4. Bla
echo ----------

echo What is your choice?
set /p choice=
goto %choice%

:1
mapofgimp\gimp.exe
goto end

:2
mapofsolitaire\solitaire.exe
goto end

:3
mapofpaint\paint.exe
goto end

:4
mapofbla\bla.exe
goto end

:end

Editing this shouldn't be very difficult..
Have fun =P
Maroc (author) 5 years ago
thanks for the help batch file kinda works still need to get it to launch when I plug the drive into a port though pic 1 what it currently does on vista pic 2 what I would like it to do on vista and something like it on xp
helpme!.jpghelpme!!.jpg
Maroc (author)  Maroc5 years ago
After some more coding I was able to do just what frollard said to do and it worked great. Funny thing is I didn't see either of these last two post until 8 this morning! Here's how I ended up ding it feel free to use if you like I'll need to test it on xp still so here's hoping! =P

autorun.inf
(a little side note there should be a set of square brackets around autorun on the next line )
Autorun
Icon=files\USB Drive.ico
Open=autorun.bat
action=Activation

autorun.bat

@echo off
:start
echo -- Menu --
echo 1. wah
echo 2. Vcl player
echo 3. Cmd vista
echo 4. Cmd Xp
echo 5. Exit
echo ----------

echo What is your choice?
set /p choice=
goto %choice%

:1
mapofapps\wah.exe
start .\apps\wah.exe
cls
goto start

:2
mapofapps\VLCPortable.exe
start .\apps\VLCPortable.exe
cls
goto start

:3
mapofapps\cmd.exe
start .\apps\cmd.exe
cls
goto end

:4
mapofapps\xpcmd\cmd.exe
start .\apps\xpcmd\cmd.exe
cls
goto end

:5
goto end
:end
Maroc (author)  Maroc5 years ago
(removed by author or community request)
Prodigity Maroc5 years ago
Ah sorry, I assumed you had put it in the autorun file but rather wanted the options to be available in the autoplay menu.. =)
frollard Maroc5 years ago
use autorun and launch the batch file - on insert it will run the batch, then you choose - you can do the same and launch an html webpage with script to resize the window and format it how you want, then a script to run the program.
Prodigity Maroc5 years ago
That's not possible sorry :/ (atleast I don't think it is..)
110100101105 years ago
copy the autorun and exe files from a cd and see if it works. then go modify
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!