How to replace applications

znilsson
Contributor II

If you are updating a self-contained application, let's say Google Chrome in this case, what are the best practices for this? If you build the dmg with Composer and set it up in self service, when it runs does it overwrite the existing Google Chrome? If not, do you need to script the removal of the existing Google Chrome first? And if so, do you have to do that via a separate script, or can you just do a

rm /Applications/Google Chrome.app

in the Execute Command field as part of the Files and Processes payload in the policy? Or is any of that necessary at all? Does Casper automatically overwrite the app when it installs? I'm asking because I have a user saying Self Service is erring out saying the app already exists, but when I run the same policy on my Mac and my test Mac, it installs the new version over the old one and I don't get any errors. Does being a local admin or not have anything to do with the difference in results here?

4 REPLIES 4

Taylor_Armstron
Valued Contributor

Apps on the Mac over-write existing. No reason to do a forced removal unless you're un-installing the application.

znilsson
Contributor II

@Taylor.Armstrong Yeah, that's what I thought too, but I have a user who is telling me that when he tries to install Chrome through Self Service, he gets a message that says it failed because "the application already exists". So if Casper's default behavior is to overwrite, then under which circumstances would somebody see that "application already exists" message?

I'm not getting that on my test Mac, even after changing my local account to a standard user rather than admin, it's not giving me any errors. So I'm trying to figure out why somebody would get that message when installing Chrome from self service. The best I can figure right now is that maybe you'd see that if the JAMF management account on the Mac didn't have admin rights. But I don't know if that's correct or not. Or how the JAMF management account would suddenly not have admin rights.

Taylor_Armstron
Valued Contributor

The only thing that comes immediately to mind is that the original application on the user's machine may have been installed with incorrect permissions. Is it something that was installed by Casper, or installed outside of the Casper environment completely?

If you have ARD access to the machine, you can check your admin rights theory fairly quickly - "dscl . read groups/admin users" should give you all users with admin rights, so you should see the management account listed there. You could also run this with Casper Remote - we don't use it much in my environment so ARD is still my "Go-To" for those types of things.

znilsson
Contributor II

@Taylor.Armstrong Thanks for that. I checked, my JAMF management account is indeed in the admin group so no worries there. I believe his version of Chrome was installed manually, outside of the Casper environment so at this point some kind of permissions snafu as you suggested seems like the most likely culprit. Thanks for the info.