I’ve assigned a name to a USB drive and I was wondering if there is an easy way to have a desktop shortcut target it based on name instead of letter.
So instead of:
F:\program_to_run.exe
it would function like:
DRIVENAME:\program_to_run.exe
While the above clearly wouldn’t work, can something similar to it be done with either a shortcut or simple batch file?
Since you’re just getting into VB.Net, how about creating a command-line program to do this for you?
Paste this code:
Then build give your application a nice name (e.g. StartByDriveName.exe) and compile it.
You can now use it in a batch file:
StartByDriveName <driveName>:<path>\ProgramNamee.g. StartByDriveName MomsUSB:\Program Files\Excel.Exe