Changing drive letter from the command line

beatle

Diamond Member
Apr 2, 2001
5,661
5
81
At work, I have a network drive mapped to F:. When I plug in my memory stick, it also tries to use F: and will not be accessable until I disconnect the network drive (net use f: /d). Is there a way I can change the drive letter that my memory stick uses without having to use disk administrator? We don't have rights to it, but I've found I can do most things (Control Panel functions) from the command line. A quick Google search turned up nothing relating how to do this from the command line.
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
i don't see how an existing drive letter would be given out to a new device
 

talyn00

Golden Member
Oct 18, 2003
1,666
0
0
if you are having problems with the network drive, just remap it to another letter.
 

GeekDrew

Diamond Member
Jun 7, 2000
9,099
19
81
Originally posted by: eklass
i don't see how an existing drive letter would be given out to a new device

It happens all the time, when the existing letter is a network resource.

I can't think of any way to change the card's assigned letter without running disk administrator, sorry. I assume that the network resource is assigned to f: in a logon script or something, so shouldn't / cannot be changed?
 

beatle

Diamond Member
Apr 2, 2001
5,661
5
81
Windows is basically too stupid to realize that another drive is already using that drive letter.

I'm trying to keep my computer consistent with the others on the network, which is why I'd like to keep the drive mapping F:. Yes, and a logon script runs that likely maps my drives for me.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
once you switch the usb drive to another letter, doesn't that letter stick? that's what happened with mine.
 

GeekDrew

Diamond Member
Jun 7, 2000
9,099
19
81
Originally posted by: oog
once you switch the usb drive to another letter, doesn't that letter stick? that's what happened with mine.

Yes, the drive letter should stick once he changes it... the problem is that he is unable to change the letter assigned to the stick because he's unable to run disk manager.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
Originally posted by: GeekDrew
Originally posted by: oog
once you switch the usb drive to another letter, doesn't that letter stick? that's what happened with mine.

Yes, the drive letter should stick once he changes it... the problem is that he is unable to change the letter assigned to the stick because he's unable to run disk manager.

sorry that i didn't read the OP carefully enough. if he has access, he might be able to switch it just by editing the values in the registry under HKEY_LOCAL_MACHINE\System\MountedDevices. i find that the drive mapping for my external USB drive is there, even though it is not currently attached.

on the other hand, if he can't run the utilities in control panel, he may not have the right permissions to make the necessary changes to the registry.
 

beatle

Diamond Member
Apr 2, 2001
5,661
5
81
This is true. I've tried editing the registry for other stuff as well without any luck. :(

I could put in a ticket with the local helpdesk, but they've been sluggish at best. I was hoping there would be a sneaky workaround. :)
 

beatle

Diamond Member
Apr 2, 2001
5,661
5
81
Has anyone used the diskpart.exe command line utility before? I think it might be able to do what I need, but I'm unsure if it's restricted or if I'm just not using it properly.

When I run it from the command line, it tells me I have to run a script with the /s parameter. If I put a command such as "list disk" in a txt file and then run diskpart /s script.txt it tells me it cannot complete the operation. It doesn't seem to take commands at the command line itself. Everything must be in a script.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
when i run diskpart from the command line, it gives me a diskpart> prompt and i can type various commands in it. it looks like you can use the SELECT command to select a volume and then ASSIGN to change the drive letter.


 

beatle

Diamond Member
Apr 2, 2001
5,661
5
81
Looks like they nerfed diskpart at work somehow. :( I get results similar to yours on my rig at home.