Skip to main content
Question

Installing Software with a scrip


Forum|alt.badge.img+3

I have some apps that need a to run a scrip after the install and have been unable to figure out how to trigger them to run after the install of the App or how to show up in Self service.  one of the App's is VPN client and the script will add  the two VPN portals we use  the other will uninstall VPN. The other app win installed asks for a FQDN as part of the setup anyway to software i can use to create a new package 

5 replies

jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • May 16, 2024

chrisB
Forum|alt.badge.img+7
  • Valued Contributor
  • 89 replies
  • May 16, 2024

Sorry, but I couldn't resist: Someone who does not know how to write "script" and never heard of preinstall and postinstall scripts should just read the basic info about adding and running scripts:

https://learn.jamf.com/en-US/bundle/jamf-pro-documentation-current/page/Scripts.html


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 8 replies
  • May 16, 2024

Thanks for the speed response, i should also have stated i am new to JAMF and the last time i used a mac was Snow leopard , I am about 1/2 way done with the 100 course and learning as i go. i know script writing in powershell and some of that has helped but it slow going trying to locate things. i know my scripts work just can get them to show up in self service i will check out the 2 recommendation Thanks again


chrisB
Forum|alt.badge.img+7
  • Valued Contributor
  • 89 replies
  • May 16, 2024

Forgive the slight offence, but before asking such basic questions, the manuals should be consulted first.

I know PowerShell can be used with Macs but I recommend using bash or zsh, which is native for Macs.


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2716 replies
  • May 16, 2024

Depends on the package, application and what you are doing. 

 

Keep in mind, Jamf runs any package it deploys unless you change the policy to cache the package. If you are needing to run a package with a script, you want to cache it rather than install it. You can then run the package with a command delivered however you want, most likely as a script payload in the same policy caching the package but run after. This way the package will cache, and the script will run the package. Then you just need to clean up the source files.

/usr/sbin/installer -pkg /Library/Application\\ Support/JAMF/Waiting\\ Room/something.pkg -target /

 

You can also repackage your package, and put a post install script in the package you made using composer. The post install script would look similar to the command above. 

 

Again, this greatly depends on what you are doing any why. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings