Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have just create a new network driver by command line using

net use

But when I try to change this drive's label by command line using label command, an error occurs:

C:\>label X: Shared
Parameters not compatible.

How can I change this by command line?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The label command will only work for a physical drive. To rename a mapped network drive, you need to rename it using My Computer on a machine. To automate this for use across many computers, the new label will be saved as a registry key. Look for the following key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2

Export the "_LabelFromReg" key for the drive in question and import the key on the other machines before your "net use" command.

share|improve this answer
2  
I suppose he could use the REG command to script it. –  paradroid Oct 12 '10 at 6:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.