Copy *.app to Mac

frankp_mdm
New Contributor II

I need to copy a preconfigured *.app from a Windows share over to the /System/Application folder on a Mac.

Unfortunately, I've been beating my head against how to do this and haven't come up with much.

I'm really hoping that someone who knows more than I do would know if there's anyway to load that *.app into Jamf and it push it down to a Mac?

Otherwise I can probably script it, but since it's Windows it's not exactly as easy as an scp command to copy from "//{fileserver}/MAC INSTALLS/PcounterClient.app" over to "/System/Application".

Any suggestions would be highly welcomed!

1 ACCEPTED SOLUTION

sdagley
Esteemed Contributor II

@frankp_mdm You should definitely look at creating a  .pkg with Composer then.

And to clarify which Applications folder is which...

/Applications is the global Applications folder available to all users

The user specific Applications folders are located under /Users as /Users/username/Applications

The /System/Applications folder contains Apple's standard apps and isn't modifiable (technically as of Big Sur there's a volume name as part of that path, but /System/Applications still works)

View solution in original post

9 REPLIES 9

sdagley
Esteemed Contributor II

@frankp_mdm Are you sure you're supposed to install the app into /System/Applications? That's not going to work because it's a protected directory for macOS these days.

If you find out it is supposed to be in /Applications you should look at Composer, a Mac specific tool available to all Jamf Pro licensees, to package the application into an installer that can be uploaded to Jamf Pro for deployment.

frankp_mdm
New Contributor II

Hi!

I don't think the program much cares which Application folder it goes into, just as long as it's accessible by the user since it also needs to be added to the Login Items for each other (which I can take of easily enough).

So it should be OK to go into the User's Application folder, but I'll have to make sure it goes into all users Application folder when they sign in the first time. That's why I was initially considering the /System/Application folder since it will be available to everyone and the script/command to push it would only have to be executed once.

Speaking of composer, I actually did have the thought of would it be possible to place the app into a PKG that could be deployed via Jamf? It's been a long time since I've done anything with custom PKG making, so I wasn't 100% sure of that either.

Thanks!

sdagley
Esteemed Contributor II

@frankp_mdm You should definitely look at creating a  .pkg with Composer then.

And to clarify which Applications folder is which...

/Applications is the global Applications folder available to all users

The user specific Applications folders are located under /Users as /Users/username/Applications

The /System/Applications folder contains Apple's standard apps and isn't modifiable (technically as of Big Sur there's a volume name as part of that path, but /System/Applications still works)

frankp_mdm
New Contributor II

Awesome! Thank you for the clarification on the /Application folders.

I will look into the pkg creation with composer.

Thank you so much for the advice!

frankp_mdm
New Contributor II

Creating the pkg file with Composer managed to do the trick. I uploaded the *.app file into Composer, created the pkg, and was able to successfully push the file out with Jamf.

I ran into a small sticking issue with what file permissions had to be set, but one that was cleared up it went perfectly!

Thanks for all the help!

mainelysteve
Valued Contributor II

Pcounter is print tracking software, correct? If so you may want to use a LaunchAgent versus LoginItems to ensure the app stays running at all times. LoginItems will just start it at login but won't maintain it throughout the user session. Unless that's what you're after?

frankp_mdm
New Contributor II

Yes, we use it for budget code tracking of our print jobs.

My original testing with using the LoginItems seemed to be OK as once it was running it seemed to stick, but sometimes had issues. lol

However, something that makes sure the app is always running would actually be highly beneficial. Thank you for the suggestion! I will look into the LaunchAgent. Is it another item in a Configuration Profile or is something that has to be executed via script? I don't off-hand recall seeing that item anywhere in Jamf.

EDIT: I got a LaunchAgent working! Thanks again for the advice!

j4ttm4co
New Contributor

Abit late to the thread - I was going to say we use PCounter at my org and I could share the launchagent bits with you.

frankp_mdm
New Contributor II

I think I actually got the launchagent working fairly well. Thank you though!
For anyone in the future, I found this website to be a great resource explaining the pieces and parts of a launchagent file and how it interacts with launchd: https://www.launchd.info/