1.

Solve : flash drive batch file help?

Answer»

i want to use a batch file to run programs off of my flash DRIVE but don't want to change the drive letter every time i plug it into a computer. I've attached what i have so far. I think i posted this in the right forum

[attachment deleted by admin]i am not sure but you may be able to use .
instead of the drive lettercan i use the name of my drive like the volume label If the batch file is on the flash drive, %~d should count as the drive letter. so i put %~d instead of F:\ or G:\ Quote from: rubiks231 on August 19, 2009, 05:59:20 PM

so i put %~d instead of F:\ or G:\
If I remember correctly then yes (otherwise it is a problem with a variable). i got it, thank youif its ok to messup the path env
at the BEGINNING of the batch file
Code: [Select]@echo off
cls
set PATH=%path%;A:\;B:\;C:\;D:\;E:\;F:\;G:\;H:\;i:\J:\;H:\:L:\
set /p A=what do you want to do:
IF '%A%' == 'pstart' GOTO pstart
IF '%A%' == 'ghost' GOTO ghost
IF '%A%' == 'internet' GOTO internet
exit

:pstart
"\USB Toolkit\PStart\PStart.exe"
pause

:ghost
"\GhostzillaCD-1.0.1-free-v1\program\Start-Ghostzilla-CD.exe"
pause

:internet
"\USB Toolkit\Tools\Internet\PortableFirefox\FirefoxPortable.exe"
pause
[/coe]


Discussion

No Comment Found