05/20/2013 3765 views

As part of my Post-Installation tasks, I have some additonal commands entered into HKLM\Software\Microsoft\Windows\CurrentVersion\Run to be run after first reboot. My very post-installation task reboots the computer, and then the very last Run entry is yet another reboot.

The issue I am experiencing is that the first reboot works fine, but for some minority percentage of Scripted Installs, the second reboot doesn't actually seem to happen. This seems to be a new issue.

Is there anything that would prevent the Shutdown command from being able to reboot the computer? One obvious issue could be open applications, but I have the timer parameter specified, and so it would force close any such applications. Are there any other explanations? 

0 Comments   [ + ] Show comments


All Answers


Are you using the Postinstall Task Converter, so that your PostInstall tasks survive the reboot?


Answered 05/21/2013 by: andrew_lubchansky
Second Degree Black Belt

  • My postinstall tasks are fine. The issue is that the shutdown command is failing for a subset of the machines. For instance, I run the scripted install on 30 machines, and 4 of them fail to reboot their second time. The other 26 finish perfectly.
    • That is odd. Is it only when you are pushing out 30+ at a time? Do you have a failure rate if you run only 20 or so at a time?
      • the failure rate seems to be the same for any amount of simultaneous runs. and this is something that has only recently started to happen
  • Just so I understand this correctly, you have:

    Scripted Install Deploys
    Boots into Windows
    Reboot PostInstall Task
    Items in Run key install
    Second Reboot Task

    Is that correct?
    • yup, except the second reboot task is a run key entry
      • Have you tried making the Second Entry a full Reboot task? Using the converter posted above would allow the extra tasks to persist past the first reboot.