Created
May 27, 2022 15:39
-
-
Save talkingmoose/08c279ab87250299ab602bf44493da91 to your computer and use it in GitHub Desktop.
Remove a drag-and-drop application before performing another task such as a software update.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
<<ABOUT_THIS_SCRIPT | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
[email protected] | |
https://gist.github.com/bd4abab222685c4e3781967a4d0491f6 | |
Originally posted: August 14, 2017 | |
Purpose: Remove a drag-and-drop application before performing | |
another task such as a software update. | |
Except where otherwise noted, this work is licensed under | |
http://creativecommons.org/licenses/by/4.0/ | |
"I want to see you out that door | |
Baby bye bye bye." | |
INSTRUCTIONS | |
1) Log in to the Jamf Pro server. | |
2) Navigate to JSS Settings > Computer Management > Scripts. | |
3) Click the " + " button to create a new script with these settings: | |
Display Name: Quit Application | |
Category: <your choice> | |
Notes: Remove a drag-and-drop application before performing | |
another task such as a software update. | |
Script: < Copy and paste this entire script > | |
Options tab: | |
Priority: Before | |
Parameter 4: Path to application | |
4) Save the script. | |
5) Add the script to a policy and set it to run before modifying | |
the application. | |
----------------------------------------------------------------------- | |
ABOUT_THIS_SCRIPT | |
/bin/rm -Rf "$4" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment