Skip to main content
Answer

jamfHelper utility window to give users a choice to run updates or not

  • September 13, 2012
  • 8 replies
  • 30 views

Forum|alt.badge.img+12

Grr, there's a post on here I can't find about using jamfHelper utility window to read a button click from a user as to whether or not they want to run updates.

Does anyone know where I can find the code for this, or at least point me in the right direction?

Best answer by mm2270

If its the one I'm thinking about, its not in the Discussions, its under the Feature Request section. See if this was it:

https://jamfnation.jamfsoftware.com/featureRequest.html?id=751

8 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • Answer
  • September 13, 2012

If its the one I'm thinking about, its not in the Discussions, its under the Feature Request section. See if this was it:

https://jamfnation.jamfsoftware.com/featureRequest.html?id=751


talkingmoose
Forum|alt.badge.img+36
  • Community Manager
  • September 13, 2012

Use the Terminal to run:

/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -help

Buttons can return all sorts of nifty things.


Forum|alt.badge.img+24
  • Valued Contributor
  • September 13, 2012

Forum|alt.badge.img+12
  • Author
  • Contributor
  • September 13, 2012

Thanks everyone!


Forum|alt.badge.img+24
  • Valued Contributor
  • September 13, 2012

Really clunking heads on the way to that answer, weren't we?


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • September 13, 2012

lol, yeah, I think that was record. 3 posts to the answer within a 1 minute window.


Forum|alt.badge.img+31
  • Honored Contributor
  • September 18, 2012

Hi Everyone,

I wrote this as proof of concept for a few people in the past of a way of end user interaction. It is bash script that calls Applescript to display a yes or no GUI box and then does something based on what the user clicks on. Obviously, everything here is a place holder. You could change it up to run custom trigger policies, or call the JAMF binary to display messages. Tons of different application here.

code example:

#!/bin/bash

# proof of concept AppleScript interaction to end user in bash

theAnswer=$(/usr/bin/osascript <<AppleScript
tell application "Finder"
 activate
 display dialog "Do you want to know the meaning of the universe?" buttons {"No","Yes"} default button 2
  if the button returned of the result is "No" then
   set theAnswer to No
  end if
end tell
AppleScript)

/bin/echo "${theAnswer}"

if [[ ${theAnswer} == "no" ]]

  then /bin/echo "They obviously have read the Hitcherhiker's Guide and know it is 42"
  else /bin/echo "The Answer is 42"
fi

exit 0

If you run this, it will echo out a response in terminal, just as a proof of concept of it running a command under the hood.

Please use at your own risk and make sure you test this a ton before putting it into production.

Thanks,
Tom


Forum|alt.badge.img+7
  • Contributor
  • October 12, 2012

The only issue with that method is that Applescript will time out after 2 minutes. You can put a "giving up after 60" then put the pop-up window in a loop until it gets a response, but if the user walks away from the machine and the screensaver is enabled, then applescript will pause and eventually time out after 2 minutes even if you specify a longer time-out period.