algorithm0 Posted September 20, 2005 Share Posted September 20, 2005 Here is what I am currently using in a batch file:net user <username> <password>my problem is that once in a while the password has special characters in it (like spaces, &, etc). It causes the command to set passwords different from what was intended. Is there a way to have such passwords using net user? Link to comment Share on other sites More sharing options...
Noise Posted September 20, 2005 Share Posted September 20, 2005 I had this problem too. I couldn't find a way around it either. In the end I had to make the passwords simpler. Link to comment Share on other sites More sharing options...
algorithm0 Posted September 20, 2005 Author Share Posted September 20, 2005 I had this problem too. I couldn't find a way around it either. In the end I had to make the passwords simpler.<{POST_SNAPBACK}>I think my way around this is to write a c++ program instead of a batch file. Link to comment Share on other sites More sharing options...
algorithm0 Posted September 20, 2005 Author Share Posted September 20, 2005 here is a special trick i just figured out:net user <username> "<password>"works like magik. Link to comment Share on other sites More sharing options...
HyperHacker Posted September 26, 2005 Share Posted September 26, 2005 That works pretty much any time you need to type a parameter that has spaces in it. Link to comment Share on other sites More sharing options...
algorithm0 Posted September 27, 2005 Author Share Posted September 27, 2005 Well I am not a big batch scripter, so help me out here. I know that when you call a program from a command line the OS sends the parameters as an array of strings to the program. So when I put quotes around ANYTHING at the command line, does the OS detect that and consider it one parameter, and hence the program itself receives it as one parameter? That would explain why I couldn't find ANY documentation regarding using quotes with the net user command. Link to comment Share on other sites More sharing options...
HyperHacker Posted September 27, 2005 Share Posted September 27, 2005 Yeah, as far as I know quote behaviour is standard to the OS, so it should do that for everything. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now