We are using JAMFHelper to display a message when Software Updates are ready for install. Since the user has a chose of doing them now or waiting, some users are just moving the message box out of the way. This stops the machine from checking in until the box is closed.
Is there a way to set a default response (2) and close the message box so that other policies and other check-ins happen?
here is the code i'm using currently:
if [ $Timer -gt 0 ]; then
HELPER=`/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType utility -icon /System/Library/CoreServices/Installer.app/Contents/Resources/Installer.icns -heading "Software Updates are available for your Mac" -description "If you would like to install updates now, save all your work then click Yes (Then go grab a coffee or snack as you won't be able to use your computer). If you would NOT like to install updates now, click Cancel. You may choose to not install updates $Timer more time(s) before this computer will forcibly install them. A reboot will be required." -button1 "Yes" -button2 "Cancel" -cancelButton "2"`
echo "jamf helper result was $HELPER";
if [ "$HELPER" == "0" ]; then
fRunUpdates
else
let CurrTimer=$Timer-1
echo "$LoggedInUser clicked Cancel"
echo "$CurrTimer" > /Library/Application Support/JAMF/.SoftwareUpdateTimer.txt
exit 1
fi
fi