none
Windows 7 shutdown script terminated suddenly after exactly 15 minutes RRS feed

  • Question

  • Hi

    Recently I've noticed a problem with the shutdown script being terminated after exactly 15 minutes. If the script was finishing earlier the wouldn't have been a problem . However the shutdown script is deploying some applications hence it takes very long. I'm aware of the GPO setting "Maximum wait time for GP scripts" and is set to 2 hours so that's fine and always has been in XP.

     

    Did a quick check in Event Viewer / System - What I found was:

     

    Event ID: 7043

    The Group Policy Client service did not shut down properly after receiving a preshutdown control.

     

     

    Did a quick search and came across the ntdebugging blog post - http://blogs.msdn.com/ntdebugging/archive/2007/06/09/how-windows-shuts-down.aspx

    and that's what I found

    "7.       Creates aKillComProcesses thread. This calls ExitWindowsExand will wait up to 15 minutes for this to complete."


    It seems to be a case that the shutdown script queue is being terminated by system service as if it was some casual process.

    Is it a bug that needs to be fixed or could there be something wrong with my setup ? Don't understand why the shutdown script service which was working always ok in XP is having troubles in windows 7 x64

     

     

    Thursday, April 15, 2010 4:53 PM

Answers

  • Hi,

    i also had this strange problem. If you deploy logoff scripts via GPO the ScriptTimeout Value in GPO does not work if the script run time is longer than 15 minutes.

    The Problem is that the Group Policy Client Service also has a timeout value (900 seconds -> 15 minutes). You can change this in the registry by.

    I prefer the gpo to change the timeout value in the client registry, cause you need system rights (not admin rights) to change the value:

     

    KEY -> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\gpsvc\PreshutdownTimeout

    Value -> set to the highest value (4294967295)

     

    This helped me, my logoff script (installing big software packages) now run fine to the end...

    Does this fix your problem too?

     

    regards, Norbert

    • Marked as answer by bossconian Tuesday, May 3, 2011 1:35 PM
    Friday, December 10, 2010 10:32 AM

All replies

  • It looks as if my question is not understood as I cannot imagine nobody is able to answer it or nobody has come across this problem .  So I'll rephrase it and state it without all technical data gathered.

     

    Is it true that shutdown script cannot execute longer than 15 minutes ?

     

    If that is true could anybody please explain / advise :

    - what's the logic behind scrapping this functionality

    - whether is going to be fixed

    - if there is any solution / fix to that at the moment

    - where can one find official microsoft's information about this case

     

    If that is not true could anybody please :

    - advise what may be a possible cause that the script is being terminated ?

     

    Thanks

    Thursday, April 22, 2010 9:02 AM
  • Isn't there an answer to this question yet?

    I would like to use an Antivir shutdown script. But the scanner needs more than just 15 mins to scan the system. This is quite annoying.

    Thursday, September 2, 2010 7:00 AM
  • Well -there is an answer for that problem. I just wonder if anybody else is struggling with that ?  
    Tuesday, November 9, 2010 7:44 PM
  • So can you explain your solution to me, please?
    Thursday, November 11, 2010 2:23 PM
  • Hi,

    i also had this strange problem. If you deploy logoff scripts via GPO the ScriptTimeout Value in GPO does not work if the script run time is longer than 15 minutes.

    The Problem is that the Group Policy Client Service also has a timeout value (900 seconds -> 15 minutes). You can change this in the registry by.

    I prefer the gpo to change the timeout value in the client registry, cause you need system rights (not admin rights) to change the value:

     

    KEY -> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\gpsvc\PreshutdownTimeout

    Value -> set to the highest value (4294967295)

     

    This helped me, my logoff script (installing big software packages) now run fine to the end...

    Does this fix your problem too?

     

    regards, Norbert

    • Marked as answer by bossconian Tuesday, May 3, 2011 1:35 PM
    Friday, December 10, 2010 10:32 AM
  • It is exactly what I did to solve the issue. Good job MS !
    Wednesday, December 15, 2010 3:18 PM