How would I go about having my PortableApps drive always show up as a particular letter (unless that letter's taken)? I would like to do it from an AutoIt script if possible. Otherwise, I'll use VC++ 6.
I'm particularly aiming this question at SmithTech, as I know his menu does it (on the other hand, it does it from Delphi/Pascal, which may be very different).
Any and all help gladly welcomed.
All my menu does is call the windows executable subst.exe.
Its a command line utility so if you type subst.exe /? into a command window it will give you the syntax for arguments.
"Because they stand on a wall and say, 'Nothing is going to hurt you tonight. Not on my watch.'" (A Few Good Men)
Coincidence is God's way of remaining anonymous.(Albert Einstein)
Hi!
There is a tool called USBDLM (USB Drive Letter Manager) here: http://www.uwe-sieber.de/usbdlm_e.htm
Ist allows you to define Driveletter according to all posible conditions (DviceID, USB port, Filename Exists,...).
I believe that utility has to be installed on the host PC, so its not very portable.
"Because they stand on a wall and say, 'Nothing is going to hurt you tonight. Not on my watch.'" (A Few Good Men)
Coincidence is God's way of remaining anonymous.(Albert Einstein)
But it allows you to mount always defined Driveletters on your PCs
There is alos a tool calles ReMount which is just commandline. It can mount ot other Drfiveletter and even Junction
type subst.exe /? into a command window
Excellent! Works a treat. I should be able to call this command from AutoIt or C++.
Thanks, SmithTech!
Q: What do agnostic, insomniac dyslexics do at night?
A: Stay awake and wonder if there's a dog.
If you are using AutoIT or C++, they can both detect what drive the are running on, so you could pretty easily have them set an environment variable like
SET PADRIVE=S:
or something, then us %PADRIVE% everywhere instead of S: (or that sort of thing).
If you are using subst, you might run into a situation where the drive letter you want to use is already assigned to something else.
MC
B: is pretty rare nowadays.
Vintage!
Rare is not the same as never.
I've seen several people who say "I'll just use B:, since its rare these days". I'm the type who figures they will end up on each other's machines sooner or later...
MC