/build/static/layout/Breadcrumb_cap_w.png

Computer not restarting after running post install jobs in image

Currently working on testing out Windows 10 LTSC 2019. I got the image  built ,pulled and deployed to a few machines. The problem I'm having is that regardless of the number of reboots I tell it during the sysprep creator tool, once the image is done deploying and all post install tasks are done, the client machine will not restart. This is going to be unique with this image cause when I pull an with LTSB 2015 and 2016 they restart and when finished take me to the login screen when completed. Curious to see if anyone is having this issue. I'm running the latest Sysprep Creator tool.  Thanks




5 Comments   [ + ] Show comments
  • If is not restarting... is it stuck in a particular task?

    Which one?

    Which version of Win10 are you deploying? (Build number).

    Question, silly... but How do you now is not restarting?, describe the current behavior - Channeler 5 years ago
    • My apologies I probably didn't describe this the best way. The image runs all post instillation tasks, but restarts and automatically logs in. Even if I set the restart count to 0, it will still restart and login and sit at the desktop. Trying to figure out why it is not restarting after every task is done and not auto logging in. The build version is 1809 ( LTSC 2019). Basically it autologging in after all tasks are done and not restarting again after that. Trying to figure out how to either to get it restart one more time and not auto-login or figure out why it is auto-logging in even after count is set to zero. - bryantjb 5 years ago
      • Are those tasks enabled for a force reboot?

        May want to check each one of those tasks, make sure the reboot option is enabled and save.

        Also back in 1703, there was a known issue with that build, not honoring the AutoLogon Count field, and it was patched later on.

        "Addressed issue where, if you specify an auto-logon configuration in Unattend.xml, auto-logon only works on the first logon, but will not work again when the device is restarted. "


        Source:
        https://support.microsoft.com/en-in/help/4022716/windows-10-update-kb4022716

        https://support.quest.com/kace-systems-deployment-appliance/kb/230791/windows-10-version-1703-no-longer-accepts-multiple-auto-logon-instructions-on-the-unattend-xml-

        Might be that thing again... since that is a new build... but check the reboot settings for each task first. - Channeler 5 years ago
  • So oddly enough my post install tasks aren't sent to reboot which for whatever reason in the past with previous builds has restarted the appropriate number of times and worked just fine. I tried to make my last install task require a reboot and it has the same result as if I didn't have it checked. The machine runs all post install tasks and restarts and auto logs in again. I think you are right in that this may be a repeat of the previous bug you mentioned. I'll probably give this some time and see if it is patched or put in a ticket with support and see what they think. I appreciate your help. - bryantjb 5 years ago
    • What is the auto login count set to when all of your tasks are complete? - chucksteel 5 years ago
      • I have tried a few different settings. In the past I always had this set to two which worked fine. For the 1809 version I have tried 2,1 and 0 auto logins. All three have the same effect oddly enough. It will run the post install tasks, restart and auto-login and sit there. - bryantjb 5 years ago
      • Have you checked the registry settings for autologin after the post-install tasks are complete? - chucksteel 5 years ago
  • Not going to lie..... I don't know how to do this. Sorry. - bryantjb 5 years ago
  • I have a system image and custom deployment LTSC2019 image and they do not have that problem. The bug I found is if you copy the administrator account to default and have it auto login as administrator post it creates a new administrator.machinename profile directory since sysprep did not delete the old administrator directory. I created a mid level task to delete the ghost directory sysprep left behind - SMal.tmcc 5 years ago
    • I will check that. Maybe that could be what is causing my issue. I know that is unique to LTSC 2019 because I created a few other images just to test and none of them has the auto login problem I'm having. I will check on this after the holidays and see if that may be my problem as well. Thanks - bryantjb 5 years ago
  • Looks like you auto logins count is more then what is required.

    use the following VB Script to reset you auto logon count as a mid level task.

    If you want to set the auto logon as 2 set the full command line to cscript SetAutoLogonCount.vbs 2

    --------------------------------------------------------------------
    Dim wshShell
    Dim xmlDoc
    Dim envVarFile
    Dim name, value, dictionary
    Dim systemDrive
    Dim computerName
    Dim AutoLogonCount

    Set objArgs = Wscript.Arguments
    AutoLogonCount = Trim(WScript.Arguments.Item(0))
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set wshShell = CreateObject("WScript.Shell")

    ' Environment variables file will be in the same place each time.
    envVarFile = "X:\KACE\Engine\EnvVars.xml"

    Set xmlDoc = CreateObject("Msxml2.DOMDocument")

    xmlDoc.Load(envVarFile)

    Set varList = xmlDoc.SelectNodes("//BootAction/EnvironmentVariables/EnvironmentVariable")

    Set dictionary = CreateObject("Scripting.Dictionary")

    For Each varNode in varList
    name = varNode.SelectSingleNode("Name").Text
    value = varNode.SelectSingleNode("Value").Text
    dictionary.add name, value
    Next

    systemDrive = dictionary.Item("IMG_SYSTEM_DRIVE")

    count = 0


    ModifyVistaConfFile()


    Sub ModifyVistaConfFile()
    unattendedXmlFiles = Array( "C:\Unattend.xml",_
    "C:\Windows\System32\sysprep\Unattend.xml",_
    "C:\Windows\panther\Unattend.xml",_
    "C:\Windows\panther\Autounattend.xml")
    fileCreated = false
    For Each unattendedXmlFile In unattendedXmlFiles
    If fso.FileExists(unattendedXmlFile) Then
    wshShell.Exec("regsvr32 C:\System32\msxml6.dll /s")
    WScript.Sleep 1000
    Set objXMLDoc = CreateObject("msxml2.domdocument.6.0")
    objXMLDoc.async = False
    objXMLDoc.setProperty "SelectionLanguage", "XPath"
    ns = "xmlns:default='urn:schemas-microsoft-com:unattend'"
    objXMLDoc.setProperty "SelectionNamespaces", ns
    objXMLDoc.resolveExternals = False
    objXMLDoc.load(unattendedXmlFile)

    settingsFound = false
    componentFound = false
    AutoLogonFound = false

    Set settingsNodes = objXMLDoc.documentElement.selectNodes("default:settings")

    for each settingsNode in settingsNodes
    If settingsNode.getAttribute ("pass") = "oobeSystem" Then
    settingsFound = true
    Set componentNodes = settingsNode.selectNodes("default:component")
    for each componentNode in componentNodes
    If componentNode.getAttribute ("name") = "Microsoft-Windows-Shell-Setup" Then
    componentFound = true
    Set AutoLogonNodes = componentNode.selectNodes("default:AutoLogon")
    if AutoLogonNodes.item(0).selectSingleNode("default:LogonCount").text Then
    AutoLogonFound = true
    AutoLogonNodes.item(0).selectSingleNode("default:LogonCount").text = AutoLogonCount
    AutoLogonNodes.item(0).selectSingleNode("default:Enabled").text = "true"
    End If
    End If
    If AutoLogonFound = true Then
    wscript.echo "yes"
    Exit For
    End If
    NEXT
    If componentFound = false Then
    componentFound = true
    End If
    End If
    If settingsFound = true Then
    Exit For
    End If
    NEXT

    objXMLDoc.Save(unattendedXmlFile)
    End If
    Next
    End Sub - PortZero 5 years ago
    • Thank you very much for this. I will give it a shot. Thanks - bryantjb 5 years ago

Answers (0)

Be the first to answer this question

 
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