The MED-V Blog

The Microsoft Enterprise Desktop Virtualization blog.

MED-V Solution: A Windows XP Image may not Auto-logon even after configuring it to do so in the VM Preparation Tool

MED-V Solution: A Windows XP Image may not Auto-logon even after configuring it to do so in the VM Preparation Tool

  • Comments 5
  • Likes

We’ve started to run into this issue every now and then so I wanted to give it a quick mention here just in case you happen to see it.  What happens is that you may run into an issue where you’ve set up a workspace with a Windows XP image and you discover that the automatic logon feature is not working when you launch the workspace for the first time to test or deploy it. 

Instead, the Virtual machine will become visible and prompt you to logon rather than logon automatically to continue the VM setup process.  This may happen even if you have enabled this using the VM preparation Tool within MED-V with the correct username and password.

This can happen if you SysPrep the machine after running the VM preparation tool because SysPrep over-writes the registry setting that the MED-V VM Preparation Tool sets inside of the Virtual Machine.

What must be done to prevent this from happening is to configure a SYSPREP.INF with the following settings under the [GuiUnattended] field:

AdminPassword
AutoLogon
AutoLogonCount
EncryptedAdminPassword

An example appears below:

[GuiUnattended]
AdminPassword = "TG33hY"
AutoLogon = Yes
AutoLogonCount = 3
EncryptedAdminPassword = Yes

For more information regarding the syntax of the SYSPREP.INF file, please refer to the DEPLOY.CHM file found in the Windows XP Deployment Tools.

Deployment Tools for Windows XP SP 2 can be found here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3e90dc91-ac56-4665-949b-beda3080e0f6

Deployment Tools for Windows XP SP3 can be found here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=673a1019-8e3e-4be0-ac31-70dd21b5afa7

Steve Thomas | Senior Support Escalation Engineer

Comments
  • Steve,

    Thanks for this. However it has not worked for me. When running the MED-V Virtual Machine Prerequisites Tool you have the option to get MED-V to logon automatically. If you set it to do so you need to speicify a password. However as mentioned here:

    http://support.microsoft.com/kb/200607 you have to have a blank Administrator password.

    I have tried setting a blank admin password on the image, not setting MED-V pre-req tool to auto logon, electing not to change the password in the sysprep.inf and making the ammendment to the AutoLogonCount as suggested. But this does not work and I have to type the admin credentials for the setup to successfully complete.

    I'm not sure of another way to do this as the image password needs to be blank for sysprep to work successfully and the MED-V Pre-Req tool password has to be set (or the option deselected) for the pre-req to successfully complete.

    Any suggestions appreciated!

    Thanks,

    Tom

  • Just as a follow up to this, I have just tried ceating a second local account on the image that is a member of the Administrators group. I then populated the MED-V Prereq tool with this account info. I left the Sysprep admin password blank and increased the auto logon count to 3...however I am still prompted to logon when setup runs.

    Troubleshooting this is annoying as it takes about an hour to make changes, recreate the package and then run the setup on the new host!

    Tom

  • Hi Tom,

    Ensure you change EncryptAdminPassword=No otherwise you will continue to receive password errors.

    Cheers

    Kings.,

  • Hi all,

    I have the same issue, after the sysprep all the parameters set before are lost, and despite in my sysprep.inf

    [GuiUnattended]

    AdminPassword = "TG33hY"

    AutoLogon = Yes

    AutoLogonCount = 3

    EncryptedAdminPassword = Yes

    can't be logged with my personal user admin, we are logged by default with the administrator account until the count of 3 is reached after we must enter credentials manually

    Please i want a solution for making the sysprep without loosing the parameters of VM preparation tool

    Kind regards

  • I found a solution that works. I might have extra steps in here, but this seems to be working for me.

    Go through the MED-V Prereq tool and setup auto login of the administrator account, this will put the settings in the registry.  If you want a different account you'll need to do your own testing.

    My sysprep.inf looks like the examples above except encrypt password is set to No

    Now run sysprep, by double-clicking on it, not command line. Select these options:

    Don't reset grace period

    Use Mini-setup

    Shutdown Mode=Quit

    Click Reseal

    When sysprep is done it will close but the machine will stay running. Now open c:\sysprep\sysprep.inf

    Remove the line that says AutoLogonCount=3, because it will be processed during the mini-setup on the next boot.  

    Now run regedit, go to hklm\software\microsoft\window nt\current version\winlogon\     Look for a DWORD called "AutoLogonCount", if it is there, delete it.

    Shutdown the machine and pack your image. The next boot should run through sysprep, login as administrator, and you are good to go. I have Med-V run a script to rename and reboot the computer again, that works fine, PC logs in automatically every time.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment