Prevent a shutdown/restart until action is complete?

Is there a way to script a fixlet or task to prevent a restart or shutdown of the Windows OS until it is completed? I have a couple of fixlets that need to wait for an application to close before running, and since many users close the apps and immediately shutdown (or shutdown while their apps are still open), these fixlets end up failing. I’ve searched high and low to no avail.
Thanks!

So if you are saying some fixlet content is shutting down the system, then its difficult to stop that from happening.

If you are saying that the content hasn’t finished but a shutdown happens which is supposed to happen at the end then there may be a way. Which is the case?

The actions need an app to quit (Outlook in one case, IE in another) before they can finish. The shutdown is user-initiated, such as when they’re leaving for the day. The actions themselves are not shutting down/restarting the machine.

Ahh so you are depending on a window between app shutdown and OS shutdown to perform an action. That is very difficult to hit. You could provide an offer to the end user to take the action when they are done to perform this action and shut down their computer?

I thought of that but was hoping to minimize any interaction with the user as they would cancel it and shut down despite any warning that an action was running. I think some kind of functionality that prevents a restart or shutdown until an action completes would be a wonderful enhancement to BigFix.
I appreciate your feedback, Alan!

1 Like

There is apparently a programatic way of doing this

https://msdn.microsoft.com/en-us/library/windows/desktop/aa376877%28v=vs.85%29.aspx

In combination with the windowing message to abort a shutdown.

So I’d suggest filing an RFE

1 Like

It may be better to prevent the user from logging in with a message while updates are installed.

I agree, I’d like to see BigFix make it easier to do this sort of thing, either at logon or logoff or both.

See here: How to ask for product help: PMRs, RFEs, and more