However, since the USB drive letter changes when I plugin to different computers, I'm having to edit the batch file every single time. Is it possible to write a script/program/something which can detect the current drive letter (of the USB drive) that it is run from and pass this drive letter to the SUBST command to load a virtual drive off a folder on the USB drive?
I can't just run the program off the USB drive as the setting file it uses has hard-coded links.
I'd really appreciate it if someone could help me write up a quick program. A script would not be all that preferable as a lot of the computers that I use block the use of vbs scripts. Best would be something which can be compiled into an exe. I myself am vaguely familiar with AHK scripts but I can't seem to find a command to detect current drive letter in AHK. What scripting language should I be looking at then? C#? VB?
Question
ramian
Hi,
I'm currently using a batch file to run SUBST to load a program off my USB drive
However, since the USB drive letter changes when I plugin to different computers, I'm having to edit the batch file every single time. Is it possible to write a script/program/something which can detect the current drive letter (of the USB drive) that it is run from and pass this drive letter to the SUBST command to load a virtual drive off a folder on the USB drive?
I can't just run the program off the USB drive as the setting file it uses has hard-coded links.
I'd really appreciate it if someone could help me write up a quick program. A script would not be all that preferable as a lot of the computers that I use block the use of vbs scripts. Best would be something which can be compiled into an exe. I myself am vaguely familiar with AHK scripts but I can't seem to find a command to detect current drive letter in AHK. What scripting language should I be looking at then? C#? VB?
Thanks!
Link to comment
Share on other sites
6 answers to this question
Recommended Posts