Hi Experts!
I have a few unattended installs I am running in a batch script... The script will be initially started using the local administrator account on non-domain PC's.
The first thing I would like to do is to have the script create a local user and password (with administrator privileges/security group) and set windows to log-in automatically using those credentials.
At this point, I would like the script to reboot the computer (using the shutdown -r command), and when the computer automatically logs-in (with the new username/password pair), the script should re-open, wait 15 seconds (ping -n 15 localhost >nul?) to let windows finish creating the new profile and continue on the next line of the batch file.
I would also like the code that'll be needed in order to get rid of the automatic log-in (i.e. for Windows XP not to remember the password and require the user to log-in).
In the first one, you will need your user account creation command.....
net user John S3cr3tPa55w0rD /add
net localgroup Administrators John /add
Change the username and the top secret password accordingly....
Then have a copy command from your source, or a network location, to copy your next .bat file into the All Users Startup Group.
Course your shutdown.....
shutdown -f -r -t 05
In the next batch file......
ping -n 15 localhost >nul (or you can use the sleep.exe command from the resource kit....)
At the bottom of the batch file, add a delete command for the secondary script, to remove it from all users startup.....