Posted on 09-13-2012 11:58 AM
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?
Solved! Go to Solution.
Posted on 09-13-2012 12:01 PM
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
Posted on 09-13-2012 12:01 PM
Use the Terminal to run:
/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -help
Buttons can return all sorts of nifty things.
Posted on 09-13-2012 12:01 PM
Posted on 09-13-2012 12:01 PM
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
Posted on 09-13-2012 12:01 PM
Use the Terminal to run:
/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -help
Buttons can return all sorts of nifty things.
Posted on 09-13-2012 12:01 PM
Posted on 09-13-2012 12:20 PM
Thanks everyone!
Posted on 09-13-2012 12:47 PM
Really clunking heads on the way to that answer, weren't we?
Posted on 09-13-2012 01:21 PM
lol, yeah, I think that was record. 3 posts to the answer within a 1 minute window.
Posted on 09-18-2012 01:40 PM
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
Posted on 10-12-2012 05:23 AM
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.