Posted on 01-24-2017 12:49 PM
Hello all!
We have a software product called Druva that we want to uninstall from all the computers before reinstalling the newest client. Problem is, the uninstall file is a .app. I can't just drag it to Casper Admin, it doesn't allow/support this.
I can't figure out how to create an uninstall for this. Anyone have experience uninstalling Druva or using a .app to uninstall a product?
Thanks for any help!
Posted on 01-24-2017 12:50 PM
What matters is what the app does - is there a script inside the app bundle, or a "manual uninstall" guide from the software vendor that you could use to write a script?
Posted on 01-24-2017 01:18 PM
Can you open the App's contents and see if there is an uninstall script within it?
Regards,
TJ
Posted on 01-24-2017 01:19 PM
<oops>
Posted on 01-24-2017 01:21 PM
There was a .scpt located in the scripts folder in the contents. When I run it via sudo it tells me bad command.
My Mac scripting is pretty non-existent. I was moved over to the Mac side recently after working pretty exclusively on Windows systems due to some very sudden personnel changes.
Posted on 01-24-2017 01:29 PM
Nevermind, I'm dumb. osascript. I was running it like a .sh script.
Can jamf read .scpt?
Posted on 01-24-2017 01:51 PM
I recently had to install the update to Sketchup 2016. The new app Sketchup 2017. I had to remove the old app to prevent confusion from the users. Here is my script:
rm -rf /Applications/SketchUp 2016
Then I just installed the new app after running the above script
Posted on 01-24-2017 06:33 PM
No idea if jamf will do the .scpt directly, but you could certainly throw it into composer from a location that made and add a post install script that made the neccesary osascript call to that location and then deleted it when it was finished.
Wrap it up as a PKG and put that in Casper.
Posted on 01-24-2017 06:52 PM
Yeah, I just took a look and you really don't want to just try to run the .scpt since there are calls in the script that assume user interaction.
The actual applescript seems simple and is just unloading the various launchdaemons and launchagents for the inSync client and then removing the application itself. You could just open the .scpt file in script editor and follow the logic and just translate the do shell commands and some of the log to a bash script.
Posted on 01-25-2017 04:56 AM
If the uninstaller app just requires click, click, next that the user can do you can install the uninstaller to the computer via a regular install pkg, then in the policy > Files and Processes > execute command enter /Applications/uninstaller program.app/Contents/MacOS/uninstaller program
where "uninstaller program.app" is the name of the actual uninstaller. You'll want to right-click on the app and follow the path structure to get the actual name of the executable within the MacOS folder. Doing it this way makes sure the uninstaller app runs as root so the user isn't' prompted to authenticate. I do that for several uninstallers of various types as long as it doesn't need an app-specific password to run. I also make sure the uninstaller doesn't let the user roam the file system with unrestricted access before I put this into play.
Posted on 01-25-2017 05:53 AM
This method is also handy for any GUI app that requires you to run it as an elevated account. Of course, you have be very careful with this method to make sure users can't do serious damage.