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?

link|improve this question

feedback

1 Answer

up vote 2 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.

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

Your Answer

 
or
required, but never shown

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