• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Changing drive letter from the command line

beatle

Diamond Member
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.
 
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?
 
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.
 
once you switch the usb drive to another letter, doesn't that letter stick? that's what happened with mine.
 
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.
 
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.
 
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. 🙂
 
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.
 
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.


 
Looks like they nerfed diskpart at work somehow. 🙁 I get results similar to yours on my rig at home.
 
Back
Top