# Batch File Password Reset



## tater929 (Feb 19, 2010)

I am currently having to go through computers and do some mundane things like check if the guest accounts are disabled and get info on each username on machines. I have a batch file that does this at each machine. The commands I'm using in the batch files are:

net user guest >> ComputerInfo.txt
ECHO "Enter Username"
set /p username=
net user %username% >> ComputerInfo.txt

I have noticed that on a small percentage of these that it says the password last set for users is the date and time I ran the batch file. It's as if my batch file is resetting the password. It happens most often on the guest account. 

I know that if I change the command to something like "net user guest 1234" that it would set the password to 1234 but my batch file only has the export command after the word "guest". The weird thing is that it doesn't happen every time. I can go to a room with 20 computers that are essentially the same and it will reset the password on maybe 4 of them. Can anybody tell me why it is doing this?


----------



## leftuncheckd (Mar 5, 2010)

My computer will interpret (space)/p(space) differently than what your batch file is asking for. I would imagine some other computers would also. Something to do with DOS. Just a guess.


----------

