Changing the Auto-LogonCount in the unattend.xml file at deployment time.

When creating an Image or Scripted install the AutoLogon count must be set. However certain Post Install tasks require a reboot so adding (or removing ) such a task changes the requirement for the AutoLogon Count of the Unattend.xml file. If you're working with a Scripted Install one can directly edit the unattend.xml from the detail page. If working with a Kimage one has to download the unattend.xml file, alter it and upload back to the image. An extra step but on the whole not too bad. Wim images are another matter, changing the unattend.xml file in a Wim image is very difficult.

You can solve this problem by installing the Change AutoLogin Count Task (you must be a member of the K2000 ITNinja Community to download this file.)  It will show up as a mid level task which you can add to an image. It will work for Kimages, Wim images, and Scripted Installs. The task itself is a Template so once installed, duplicate the task and make appropriate changes to the copy. The template task sets the Auto Logon Count to 6, turns on the debut option, and uses the default location for the unattend.xml file. Change the duplicated task settings to suit your needs.

It is recommended the duplicated task's name be changed to reflect the Auto Login Count number specified on the command line for that task.

If the task sets the Auto Login Count to 6 the name might be “set autologin count 6” to avoid confusion with any other duplicate tasks

that set the count to something else.

The task takes up to three command line arguments

-cXX where XX is an integer from 0 – 99 note there are no spaces between the -c and the XX

        NOTE: For K2000 3.6 or better an auto login count of 1 or higher is required for task engine to run.

-pPATHTOUNATTEND.XML where PATHTOUNATTEND.XML is the full path (including the drive letter )

to the unattend.xml if your Image or SI does not use the default OSDRIVE:\windows\panther\unattend.xml

note: there are no spaces between the -p and the full path. If the path has spaces in the names

it must be surrounded by double quote marks.

Example : -p”C:\windows\other path\unattend.xml”

the unattend.xml MUST be included in the PATHTOUNATTEND.XML argument

-d This is the debug option. When included, full details of the task run will be written out to the

\\k2\petemp share with the name MAC_set_auto_count.log where MAC is the mac address of the machine

on which the task ran.

The -cXX argument is required while -p and -d are optional.

When running, if the task fails it will usually provide an error code to the task manager. Reference the return code below for the most common failures.

10 no windows drive could be located. A DRIVE:\windows folder could not be found.

11 Invalid number of arguments must be 1 to 3. There must be at least 1 and no more than 3.

if there are spaces in the -p option inclose it with double quotes

12 invalid argument -cXX, -pPATH, and -d are valid

13 the -cXX argument is required

14 the -cXX the xx must be an integer in the 0 - 99 range

15 the -pPATHTOFILE requires the PATHTOFILE exist

16 no autologin entry was found in the unattend.xml file

If the task fails to work as expected, add the -d option to the command line and look for the debug file on the \\k2\petemp share.

Back to the K2000 Deployment Workbench Page


  • How do I upload the template and run this program? It is a zipped file with a package and XML doc. - tech@chch.org 7 years ago
  • How do I upload the template and run this program? It is a zipped file with a package and XML doc - Sjdockens 6 years ago
    • you will need to import the package file into your k2000. so copy it to your k2000 restore share, go to package management > import package and find the file in the list and import it. the task will then show up in your Post Install tasks and you can add them to your deployments. - genfoch01 6 years ago
      • Thank you, I will give it a shout. - Sjdockens 6 years ago
  • The autologin count will not work with Win10 1703:

    http://www.itninja.com/question/windows-10-creators-autologin-count?source=itn_email&campaign=digest&medium=daily&content=question_detail - Channeler 5 years ago
    • I was just looking for info on 1703 autologin not working.

      Thanks and let me take a look at this. - phillybits 5 years ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ