Casper Imaging and a ZeroTouch policy

mcmeekin91
New Contributor II

Just for a quick background I work in k-12 and we have a 1 to 1 set up in the High school. I am currently setting up my workflow to work on both DEP enrollment and Casper Imaging. We have hundreds of computers not in DEP so we still need to use Casper Imaging over the summer to reload all the student laptops. To do this I have created a ZeroTouch policy that runs on enrollment. What this policy does is runs a script that call a custom event trigger also called ZeroTouch. I then have all my software set to install off of the custom event ZeroTouch.

To keep track of this I have the ZeroTouch script add a txt file to /Library with a 0 in it. I then have every program that installs off the ZeroTouch trigger run a scripts that checks if the number I set is met and if not it adds a 1 to the txt file. Right now I just have it pop up a message with jamfhelper when it hits that number but there are a couple down sides to this. It will not show up if your not logged in and there is no way to track the progress of it. I was wondering if there was anyways to have a message pop up at the login screen or if there is a way to not load the log in screen until the software is done installing. Kinda like how it works when policies are set to trigger at start up they give you a little message in the corner and the login doesn't pop up until it's done. I include my scripts just for reference bellow.

ZeroTouch - Runs on enrollment

#!/bin/bash

#Creates a text file and puts 0 in it
#File is ment to count the policies ran by ZeroTouch
touch /Library/Counter
echo "0" > /Library/Counter

#Run the event trigger ZeroTouch
jamf policy -event ZeroTouch

exit 0

ZeroTouch Counter - Added to each policy that runs of the ZeroTouch event trigger

#!/bin/bash

#Sets Var1 to the current ZeroTouch Counter
Var1=$(cat /Library/Counter)

#Checks to see if all policies were installed
#Must change Limit for amount of policies that are suppose to run
#If it hasn't hit the limit it will add 1 to the counter.
if [ "$Var1" = "8" ]
then
    /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/Jamfhelper -windowType hud -title "ZeroTouch" - heading "ZeroTouch Notification" -description "Software Has Been Installed" -button1 "Done" -defaultButton 1 
else
    Var1="$(($Var1 + 1))"
    echo $Var1 > /Library/Counter
fi

exit 0

Any help is greatly appreciated.
Thanks.

2 REPLIES 2

georgecm12
Contributor III

Since you're doing DEP and triggering an action at enrollment, you might find the various attempts to recreate the IBM Progress Screen (first seen by the public at JNUC 2015) useful. They all function somewhat similar, displaying something full-screen, and most will also display the progress of the various "at enrollment" tasks.

https://www.jamf.com/jamf-nation/discussions/17467/ibms-enrollment-screen-recreated

mcmeekin91
New Contributor II

That looks promising. I'll give it a shot and see if it will work for what i'm trying to do. Thanks!