How to Install a Custom App with JamfPro

-Cloud
New Contributor III

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!

1 ACCEPTED SOLUTION

jamf-42
Valued Contributor II

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 solution in original post

17 REPLIES 17

efil4xiN
Contributor II

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
Valued Contributor II

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

-Cloud
New Contributor III

The app is called Netclean Proactive agent.

jamf-42
Valued Contributor II

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.. 

-Cloud
New Contributor III

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;

IMG_1829.jpeg

 

 

bran
New Contributor III
New Contributor III

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
Valued Contributor II

check ya link.. copy paste may have let you down 😎

bran
New Contributor III
New Contributor III

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

jamf-42
Valued Contributor II

"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)."

-Cloud
New Contributor III

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
New Contributor III
New Contributor III

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."

jamf-42
Valued Contributor II

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

-Cloud
New Contributor III

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
Valued Contributor II

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.. 

-Cloud
New Contributor III

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
Valued Contributor II

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. 

-Cloud
New Contributor III

Ah that could be it!

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

Thanks again