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?
No. Windows 8 had little to no spywhare, is actually faster than 7 but it has the dreaded start screen, nothing that you could not fix with start8. Windows ME crashed often, but was shotlived and replaced by XP, which is a much better windows in itself.
Windows 8 was uninspiring but it was fine / worked. It was just overshadowed by how great Windows 7 was. Windows ME seem to be just unstable for most people - I was using Windows 2000, which was far superior. The two best versions are Windows 7 and 2000
I don't think ME was that bad. The stability issues were mostly caused by drivers. This was when the switch from vxd to wdm was happening. The other complaint was not being able to shut down into DOS anymore which was silly with XP right around the corner.
As much as I hated Windows 8, although I never used it personally on any of my own machines, I think Windows Me was hands down the worst OS from MS.
I have Windows 11 on 2 unsupported machines and haven't had any issues and I actually kind of like it. Still hate how slow Windows updates are though.
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
https://www.neowin.net/forum/topic/606906-script-to-detect-current-drive-letter/Share on other sites
6 answers to this question
Recommended Posts