Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Continue batch file after restart

Avatar of taki1gostek
taki1gostekFlag for United States of America asked on
Windows XPWindows BatchVB Script
20 Comments1 Solution8927 ViewsLast Modified:
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).