Skip to main content
Solved

How to Install a Custom App with JamfPro


Forum|alt.badge.img+4

Hi everyone,

Hope someone can help me with the below issues I am having;

I am trying to install a custom app which I got from a vendor in a .dmg format.  Within the dmg there is a .pkg file and then two script files called install.tool and uninstall.tool

As per guidance by the vendor I need to run a command to call the "install.tool" via a command and then add a parameter to point it to a server which we have running in our environment.  This all needs to happen before the actual installation takes place i.e. while the .dmg file is mounted and I think this is where I am going wrong or having difficulty to run the above script via command before the actual installation takes place.

I have come across a few threads on here to use composer which I have done but I have not had any particular success deploying it via JamfPro. 

It seems weird, as if I run the .pkg file (which I got from composer) on the test I have Mac, the program installs fine but not via JamfPro

Sorry my Mac and Jamf skills are not great but learning as I go along, thank you for all your help and patience in advance!

Best answer by jamf-42

hi, this is nice and simple.. this is the line we are interested in:

defaults write com.ncpa.settings nms_addr -string "${SERVER}"

when you run  install.tool you add a server IP or DNS name ( I don't need to know it) for example lets say its:

test.domain.com 

so all we need to do is replace $SERVER with that and run that as a script in the policy.

so create a new script as follows: 

 

#!/bin/sh # sets server defaults write com.ncpa.settings nms_addr -string "test.domain.com"

 

add that to policy setting it to run BEFORE

add pkg to policy

scope to a test Mac and see what happens.. 

View original
Did this topic help you find an answer to your question?

17 replies

Forum|alt.badge.img+8
  • Valued Contributor
  • 106 replies
  • August 9, 2023

You may get help faster by naming the app. You would be surprised how many have been in the same situation and posted  assistance


jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • August 9, 2023

be useful to know the vendor and what you are trying to install.. 


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • August 9, 2023
jamf-42 wrote:

be useful to know the vendor and what you are trying to install.. 


The app is called Netclean Proactive agent.


jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • August 9, 2023
-Cloud wrote:

The app is called Netclean Proactive agent.


without seeing what the scripts do its hard to say how this works.

I'd contact their support for more guidance.

you can try:

copy the content of the install.tool script / text file to jamf as a script. you'll need to see how the viable is parsed into the script and possibly hard code it.. 

upload the pkg to jamf 

create a policy that runs the install.tool script 'before' 

with the pkg in the policy

worth a try on a test device.. 


bran
Forum|alt.badge.img+13
  • Employee
  • 12 replies
  • August 9, 2023

JFYI: There is a post about deploying this app from 2021 as well, where they successfully deployed using Jamf with help from the vendor: https://community.jamf.com/t5/jamf-pro/custom-dict-plist-for-ios/m-p/244110


jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • August 9, 2023
bran wrote:

JFYI: There is a post about deploying this app from 2021 as well, where they successfully deployed using Jamf with help from the vendor: https://community.jamf.com/t5/jamf-pro/custom-dict-plist-for-ios/m-p/244110


check ya link.. copy paste may have let you down πŸ˜Ž


bran
Forum|alt.badge.img+13
  • Employee
  • 12 replies
  • August 9, 2023
jamf-42 wrote:

check ya link.. copy paste may have let you down πŸ˜Ž


link works for me, what's it saying for you? 


jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • August 9, 2023
bran wrote:

link works for me, what's it saying for you? 


"I'm trying to find a way to create a custom configuration profile for an app and distribute it to all our iOS devices. The manual only has a guide on how to do it in VMWare Workspace One (where you just copy and paste the whole string into a "custom" field)."


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • August 9, 2023
bran wrote:

link works for me, what's it saying for you? 


Hi Bran, the link points to an article for how to install a configuration progile installation before doing this I need the actual software to install on the machine before that.


bran
Forum|alt.badge.img+13
  • Employee
  • 12 replies
  • August 9, 2023
-Cloud wrote:

Hi Bran, the link points to an article for how to install a configuration progile installation before doing this I need the actual software to install on the machine before that.


https://community.jamf.com/t5/jamf-pro/custom-dict-plist-for-ios/m-p/246702/highlight/true#M230920

I would still consider replying to this user to see if they still have their in-house documentation lying around. Even though they installed for iOS and you're installing for macOS. But yeah, not as useful for your post. Got excited and pulled the trigger too soon, good luck to you! :)  

"We got this working, wohoo. Thanks for the help @jcaleshire, we're providing Netclean with some screenshots and information on how to set this up working in Jamf now so that it will be easier for other customers."


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • August 9, 2023
jamf-42 wrote:

without seeing what the scripts do its hard to say how this works.

I'd contact their support for more guidance.

you can try:

copy the content of the install.tool script / text file to jamf as a script. you'll need to see how the viable is parsed into the script and possibly hard code it.. 

upload the pkg to jamf 

create a policy that runs the install.tool script 'before' 

with the pkg in the policy

worth a try on a test device.. 


I’ve already got in contact with their support team however there has been very minimal support as they say they do not support jamf…which i honestly find hard to believe.

 

here is the command that I need to execute when the dmg is mounted;

 

 

 


jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • August 9, 2023

copy paste the install.tool script here.. (or DM me) and we can fix this.. 


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • August 10, 2023
jamf-42 wrote:

copy paste the install.tool script here.. (or DM me) and we can fix this.. 


Hi,

Please see below script of install.tool

Grateful for any help!  Been at this for a few weeks now and its giving me sleepless nights!  

My scripting skills are not so great

 

 

#!/bin/sh
if [[ $(id -u) -ne 0 ]] ; then
echo "Please run this install script as root"
exit 1
fi

while [[ $# -gt 1 ]]
do
key="$1"

case $key in
-s|--server)
SERVER="$2"
shift # past argument
;;
*)
# unknown option
;;
esac
shift # past argument or value
done
if [[ -n ${SERVER} ]]; then
echo SERVER = "${SERVER}"

defaults write com.ncpa.settings nms_addr -string "${SERVER}"
installer -pkg netclean-proactive-agent-*.pkg -target /
else
echo "Server needs to be specified."
echo "Please use install.tool -s \\"ip or dns\\""
fi
if [[ -n $1 ]]; then
echo "Last line of file specified as non-opt/last argument:"
echo $1
fi


jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • Answer
  • August 10, 2023

hi, this is nice and simple.. this is the line we are interested in:

defaults write com.ncpa.settings nms_addr -string "${SERVER}"

when you run  install.tool you add a server IP or DNS name ( I don't need to know it) for example lets say its:

test.domain.com 

so all we need to do is replace $SERVER with that and run that as a script in the policy.

so create a new script as follows: 

 

#!/bin/sh # sets server defaults write com.ncpa.settings nms_addr -string "test.domain.com"

 

add that to policy setting it to run BEFORE

add pkg to policy

scope to a test Mac and see what happens.. 


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • August 10, 2023
jamf-42 wrote:

hi, this is nice and simple.. this is the line we are interested in:

defaults write com.ncpa.settings nms_addr -string "${SERVER}"

when you run  install.tool you add a server IP or DNS name ( I don't need to know it) for example lets say its:

test.domain.com 

so all we need to do is replace $SERVER with that and run that as a script in the policy.

so create a new script as follows: 

 

#!/bin/sh # sets server defaults write com.ncpa.settings nms_addr -string "test.domain.com"

 

add that to policy setting it to run BEFORE

add pkg to policy

scope to a test Mac and see what happens.. 


That worked!  That was nice and simple enough (usually its not πŸ˜…)

Thank you very much for your help with this!  πŸ˜€

Something strange though, as I mentioned in my OP, when I used composer to make a .pkg and have a postflight script to run within this it failed to deploy via Jamf but if I ran the .pkg file from the Mac itself it worked.  Any ideas why this could be?

On a side note, is it a good practise to run this policy or any policy for that matter to re-occur in "Check-ins"?


jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • August 10, 2023
-Cloud wrote:

That worked!  That was nice and simple enough (usually its not πŸ˜…)

Thank you very much for your help with this!  πŸ˜€

Something strange though, as I mentioned in my OP, when I used composer to make a .pkg and have a postflight script to run within this it failed to deploy via Jamf but if I ran the .pkg file from the Mac itself it worked.  Any ideas why this could be?

On a side note, is it a good practise to run this policy or any policy for that matter to re-occur in "Check-ins"?


progress we like it πŸ˜Ž 

if you put the script in post flight to set the plist, then this is after the pkg install, when it needs to be before.. maybe that broke it? 

pkg install polices should be a run once, unless you have additional logic / smart groups and require a pkg to 'self repair eg when someone removes AV. 


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • August 10, 2023
jamf-42 wrote:

progress we like it πŸ˜Ž 

if you put the script in post flight to set the plist, then this is after the pkg install, when it needs to be before.. maybe that broke it? 

pkg install polices should be a run once, unless you have additional logic / smart groups and require a pkg to 'self repair eg when someone removes AV. 


Ah that could be it!

And noted about the PKG install policy might need to tinker the trigger of the policy....

Thanks again


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