NationStates Jolt Archive


Help with batch files

Arribastan
26-04-2005, 02:08
Well, I was fooling around in batch, and I had a question. Specifically about pressing "enter" for the user without them having to do it. Let's say I wanted to change my password to the letter "e":


C:\Documents and Settings\Beck>net user beck *
Type a password for the user:
Retype the password to confirm:
The command completed successfully.



Now, I want to know how, in batch, to get it to press "enter" for me. I start with


net user beck *


I get the "type a password"
I want to press enter for no password, without any input from the user.
Is there a way to do this?
Arribastan
26-04-2005, 02:23
*bump*
Help, please.
This thing is really bugging me.
Peechland
26-04-2005, 02:26
I am so non computer savvy but I have a soft spot for threads with no replies......sorry love. Maybe some wicked smart computer person will come sign on soon.(Upward Thrust.....paging Mr Thrust.....we have an emergency)
Arribastan
26-04-2005, 02:29
I am so non computer savvy but I have a soft spot for threads with no replies......sorry love. Maybe some wicked smart computer person will come sign on soon.(Upward Thrust.....paging Mr Thrust.....we have an emergency)
Thanks anyway. Maybe one of my friends will come on AIM. Well, one of the two computer-savvy ones. :mad:
Alien Born
26-04-2005, 02:50
You would have to echo the ascii code for return to do this. (I don't have an ascii table in front of me but I believe it is #013. )
Arribastan
26-04-2005, 02:52
You would have to echo the ascii code for return to do this. (I don't have an ascii table in front of me but I believe it is #013. )
so:

@ echo off
net user beck *
@ echo 013
@ echo 013

?
Arribastan
26-04-2005, 02:57
I've gotta go for the night, but thanks for your help Alien Born.
I'll check this tomorrow morning.
Arribastan
26-04-2005, 11:24
bump before school.
Glenham
26-04-2005, 18:16
*bump*
Help, please.
This thing is really bugging me.

I'm a coder, but I haven't done much with batch files in years.

I'll try and figure it out and let you know as soon as I'm able. :)
Glenham
26-04-2005, 18:24
If you use:
net user Beck password [new_password]
That will set the password to whatever new_password is, or set it to an empty password if not provided.