Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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:


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
I suppose he could use the REG command to script it. – paradroid Oct 12 '10 at 6:32

Another perhaps slightly faster method is using Powershell:

$a = New-Object -ComObject shell.application

$a.NameSpace( "X:\" ) = "YOURLABEL"
share|improve this answer

Your Answer


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.