net use command with password starting with /

June 24, 2010 at 08:46:05
Specs: Windows 2003
trying to use net use command with a user whose password starts with and/or contains the forward slash character / - attempt fails as / is usually a switch for a command line option..how do I get around this?

See More: net use command with password starting with /

Report •

#1
June 24, 2010 at 09:06:45
Instead of entering the password at the command line enter the * character. You will then be prompted for the password. This is also more secure because the password is never displayed on the screen.

Report •

#2
June 24, 2010 at 09:18:34
Thanks.. will this work though if I want to map a network drive in a batch script? I know this is less secure but I'm more interested in it running without intervention at the moment... can I not use some variation of an escape sequence? \/ doesn't work and enclosing it in double quotes doesn't work either..

Report •

#3
June 24, 2010 at 09:59:21
I haven't used this in a script so I don't know if it will work.
An escape character itself can often be used by using // but don't know if it will work here.

Report •

Related Solutions

#4
June 24, 2010 at 10:01:09
have tried using // followed by the rest of the password
but the net command fails saying the option /<password> is unknown..

Report •

#5
June 24, 2010 at 18:14:00
Typically the carat ^ is used as an escape character in (Windows) batch.

Insomniac at large


Report •

Ask Question