AutoAdminLogon info removed after XP restarts

Posted on 2002-06-25
Medium Priority
Last Modified: 2012-08-14
The first time XP restarts after the unattended install, the AutoAdminLogon=1 value in registry gets set to 0, and DefaultPassword also gets removed.

Under NT 4, after our automated install of NT, we run a script that installs all our common applications.
Under Win XP I'm trying to do the same thing, but here's what happens:
In Unattend.txt, under the [GUIRUNONCE] I call my script (stage.exe) - it launches fine, and since I have 3 steps in it, I have it log off, reboot and call itself again with a parameter of 2 (for step 2) via the runonce key.

Here's the crux of the matter.  Before the script logs off and reboots, I set the AutoAdminLogon to 1 and put the settings in for Administrator to log on.  However, it seems that after XP runs the script called by GuiRunOnce, it sets the AutoAdminLogon back to 0 !!!!!  Thus, to carry on my script, I have to manually log in - this only happens after the first step (From XP's viewpoint, after it runs the script it calls from GuiRunOnce, 'cause it doesn't know about the multiple steps).

Thus my questions - do you know how to remove this 'feature'?  Is there perhaps a 'shutdown' script that is run after the XP setup which is removing these settings?
Any advice would really help

Question by:lz7y4l
  • 3
  • 2

Accepted Solution

schristie11 earned 400 total points
ID: 7108867
Have you reviewed the documentation and option for a Sysprep install and how they may relate to your issue here?

Just a suggestion. I'm pretty new at Unattended and deployment-type installs.

Expert Comment

ID: 11231102
I have exactly the same problem but no resolution.
The sysprep option is not viable because I am working with different types of machines with various hardware.

Author Comment

ID: 11231232
I actually found the solution years ago - here's why it was rebooting...
A new feature with XP's uninstalls is a line in the unattend.txt called     AutoLogonCount.

In our case we set     AutoLogonCount=4, and then after XP's automated install it will set autoadminlogon to 1 in the registry for the next 4 reboots.  What was causing my problem was that this AutoLogonCount was set to 0 or 1 (I can't remember), so after the 1st reboot it would set the Autoadminlogon in the registry to 1.  THus, the solution is to set this number to the number of reboots you require.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.


Expert Comment

ID: 11231364
I have experimented with the AutoLogonCount and it does work, however...
1) I need to AutoLogon as a Domain User.
2) On the 2nd reboot it needs to continue running a script (obviously the runonce only works once)
3) Both registry changes and copy commands do not seem to work in the runonce batch file but they work fine when the batch file is ran any other time.... strange.
Any ideas?

Author Comment

ID: 11232194
We call a script from the runonce and that script takes care of the rest...
Eg. Runonce calls  stage.bat - at the end of step 1 in stage.bat, it goes to a subroutine that calls itself again with a parameter of 2 (ie. it puts in the runonce of the registry "stage.bat 2" and it the subroutine sets the autologon.
Next, after the reboot it autologs on, calls Stage.bat and it starts step 2.  When step 2 is complete, the subroutine is called and it sets the autologon again and puts in the runonce "stage.bat 3", etc. until you're done

Expert Comment

ID: 11232686
Thanks for the input.
I have finally resolved this by using cmdlines.txt
I was able to change the registry from within cmdlines.txt and it has worked out well. :-)

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question