User prompt before policy execution

russell_kennyOL
New Contributor III

Hi Guys,
Have a fun one, i have a policy i want to put in place to do software updates during certain times.
Once completed, if a restart is required, the users have 90 minutes before the machine will restart after they hit ok.

I have been asked by the teams if we can put a prompt for the user prior to the policy executing do cancel the policy running, (in case it closes applications during the update)
and also a timeout option if the user is not at the machine to execute the policy.

Has anyone come been asked to implement this?
Just checking before I start looking into this.

Cheers Guys.

-Rusty

3 REPLIES 3

mm2270
Legendary Contributor III

I haven't done this exact thing, but similar stuff.
Its not too hard to do. The way I'd approach is by having two policies. One that kicks off at the specified time or by whatever trigger you choose that pops up the message to the user and gives them the option of canceling. The message can be done with jamfHelper with "Cancel" and "Continue/OK" buttons. You can have a timeout for the message and have it "press" the default "OK" button.
Whatever button is pressed, either by the user or because it times out, you can capture that in the script and then either exit out and echo back the status, or execute the actual software update policy using a manual trigger.

That's the high level idea. You'd probably also want to put some checks in it to see if someone is actually logged in or if the machine is sitting at the Login window and take the appropriate action in either case.

talkingmoose
Moderator
Moderator

The jamfhelper tool will do what you're needing. Have you looked at it yet?

https://jamfnation.jamfsoftware.com/article.html?id=107

russell_kennyOL
New Contributor III

thanks guys, ill have to do some testing soon, looks like my Mirrored raid on the JSS box has failed, so ill have to test this a litte later!

I will definately look at the jamfhelper tool too!