Hello,
So I am trying to use Jamf Helper to give our users some flexibility as to when they want to upgrade to Office 2019. My main concern is not forcing the upgrade when they are using the apps, and either the upgrade fails because apps are open, or force quitting of the apps causing loss of unsaved work.
So I thought Jamf Helper might be the way to go.
Below is the script I am using, and a screen shot of the utility window.
Question: How do I actually get the delay to do something? Right now it just ends the attempt with an error that the policy failed. Ideally I'd like the user to keep snoozing the window until they are ready to install.
#!/bin/bash
####################################################################################################
#
# Copyright (c) 2013, JAMF Software, LLC. All rights reserved.
#
# This script was written by the JAMF Software Profesional Services Team
#
# THIS SOFTWARE IS PROVIDED BY JAMF SOFTWARE, LLC "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL JAMF SOFTWARE, LLC BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#####################################################################################################
#
# SUPPORT FOR THIS PROGRAM
#
# This program is distributed "as is" by JAMF Software, Professional Services Team. For more
# information or support for this script, please contact your JAMF Software Account Manager.
#
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# jamfHelperByPolicy.sh
#
# SYNOPSIS - How to use
# Run via a policy to populate JAMF Helper with values to present messages to the user.
#
# DESCRIPTION
#
# Populate script parameters to match the variables below.
# Pass in values into these parameters during a policy.
#
####################################################################################################
#
# HISTORY
#
# Version: 1.0
#
# - Created by Douglas Worley, Professional Services Engineer, JAMF Software on May 10, 2013
#
####################################################################################################
# The recursively named JAMF Helper help file is accessible at:
# /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -help
windowType="" # [hud | utility | fs]
windowPosition="" # [ul | ll | ur | lr]
title="" # "string"
heading="" # "string"
description="" # "string"
icon="" # path
iconSize="" # pixels
timeout="" # seconds
[ "$4" != "" ] && [ "$windowType" == "" ] && windowType=$4
[ "$5" != "" ] && [ "$windowPosition" == "" ] && windowPosition=$5
[ "$6" != "" ] && [ "$title" == "" ] && title=$6
[ "$7" != "" ] && [ "$heading" == "" ] && heading=$7
[ "$8" != "" ] && [ "$description" == "" ] && description=$8
[ "$9" != "" ] && [ "$icon" == "" ] && icon=$9
[ "$10" != "" ] && [ "$iconSize" == "" ] && iconSize=$10
[ "$11" != "" ] && [ "$timeout" == "" ] && timeout=$11
HELPER`"/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfhelper" -windowType "$windowType" -windowPosition "$windowPosition" -title "$title" -heading "$heading" -description "$description" -icon "$icon" -iconSize "$iconSize" -button1 Install Now” -button2 Snooze -defaultButton 2 -cancelButton "2" -countdown "$timeout" -timeout "$timeout" -showDelayOptions "900, 1800, 3600, 7200, 14400"`
echo "jamf helper result was $HELPER"
if [ "$HELPER" == "0" ]; then
/usr/bin/jamf policy -trigger office2019
exit 0
else
echo "user chose No";
exit 1
fi

