You are here

Drive Letter

9 posts / 0 new
Last post
psychedelic-squid
psychedelic-squid's picture
Offline
Last seen: 16 years 1 month ago
Joined: 2007-09-12 10:12
Drive Letter

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.

SmithTech
SmithTech's picture
Offline
Last seen: 2 years 3 weeks ago
Developer
Joined: 2006-11-24 18:06
Subst.exe

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)

Torpedro
Offline
Last seen: 10 years 7 months ago
Joined: 2006-02-05 14:52
USBDLM

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,...).

SmithTech
SmithTech's picture
Offline
Last seen: 2 years 3 weeks ago
Developer
Joined: 2006-11-24 18:06
Has to be installed

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)

Torpedro
Offline
Last seen: 10 years 7 months ago
Joined: 2006-02-05 14:52
True

But it allows you to mount always defined Driveletters on your PCs Smile
There is alos a tool calles ReMount which is just commandline. It can mount ot other Drfiveletter and even Junction Smile

psychedelic-squid
psychedelic-squid's picture
Offline
Last seen: 16 years 1 month ago
Joined: 2007-09-12 10:12
Great advice.

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.

rab040ma
Offline
Last seen: 2 weeks 2 hours ago
Joined: 2007-08-27 13:35
environment

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

Bahamut
Bahamut's picture
Offline
Last seen: 12 years 4 months ago
Joined: 2006-04-07 08:44
B: is pretty rare nowadays.

B: is pretty rare nowadays.

Vintage!

rab040ma
Offline
Last seen: 2 weeks 2 hours ago
Joined: 2007-08-27 13:35
Uhhhh

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

Log in or register to post comments