Hi.
We are trying to deploy macOS PKG applications, however we are having some issues.
First;
When using VMware Airwatch Admin Assistant to create pkg, png and plist file, some error occurs and the version which is "created" with Admin Assistant becomes version 0.0.
I tried renaming the PKG file and information in the PLIST, however when uploading to Apps & Books in Console, it shows as version 0.0 and imediately shows all assigned devices as Installed. Even though none has installed.
Any clues to this? This is for GlobalProtect Agent for macOS.
Second;
We have another application, PKG file, which also has a following XML which contains a customber number and URL to cloud-service.
How do we deploy the PKG file, but also get the XML to the same application folder?
We would of course like to use Apps & Books with more features for application deployment, and not revert to the tedious Products part.
Thanks for all input.
Regards
Tommy
TommyThomassen --
I was playing around and I think you can also do this a second way:
1) Rename the plist/pkg files before you upload them
2) Modify the plist:
<key>installs</key>
<array>
<dict>
<key>CFBundleIdentifier</key>
<string>com.paloaltonetworks.GlobalProtect</string>
<key>CFBundleName</key>
<string>GlobalProtect</string>
<key>CFBundleShortVersionString</key>
<string>5.0.2-13</string>
<key>minosversion</key>
<string>10.10.0</string>
<key>path</key>
<string>/Applications/GlobalProtect.app</string>
<key>type</key>
<string>application</string>
<key>version_comparison_key</key>
<string>CFBundleShortVersionString</string>
</dict>
</array>
Hey Tommy,
first: Try it out, maybe the app "VMware Airwatch Admin Assistant" is broken and needs to be reinstalled.
second: To assign a configuration to an app in advance you need help from the developer, who offers you a possibility to repackage your app. For examples, see Firefox for Enterprise (https://support.mozilla.org/en-US/products/firefox-enterprise/policies-customization-enterprise).
kind regards
Benjamin
Thanks for the tip.
Tried reinstalling, also now download latest 2.0.1 version. Still no luck. Also tried on different MacBook, with both local user (standard) and admin-user.
Still no luck.
GlkobalProtect.pkg is created with pkg and plist, and version is 0.0.
Tried contacting vendor, but they do not repackage themselves.. only supply XML with their PKG. 😕
TommyThomassen --
I think part of the problem you're running into is that the GlobalProtect app has a funky build version in the Info.plist (such as 5.0.2-13).
Hub (using internal apps) uses 3 main methods to determine if an app needs to be installed: install check script (in the UI), the Installs Array (in the plist), or the receipts array (in the plist).
Since the Workspace ONE Admin Assistant can't pull out the version number (and the receipts left by the installer process always show a version of "0", you'll need to make some modifications to make this work.
1). Rename the plist/pkg files before you upload them:
2). Change the plist file as such:
3). When creating the app assignment in the Workspace ONE console, use an install check script (this is basic, but you get the point):
#!/bin/zsh
if [ -f /Applications/GlobalProtect.app/Contents/Info.plist ]
then
VERSION=$(/usr/bin/defaults read /Applications/GlobalProtect.app/Contents/Info.plist CFBundleShortVersionString) ;
if [ $VERSION = "5.0.2-13" ]
then
echo $VERSION
echo "Correct Version Installed - No Install Needed"
exit 1 ;
else
echo $VERSION
echo "Wrong Version - ReInstall"
exit 0 ;
fi
else
echo "Install Required"
echo "Info.plist Not Found"
exit 0 ;
fi
With the script written this way, you can run tail -F -n 60 /Library/Application\ Support/AirWatch/Data/Munki/Managed\ Installs/Logs/ManagedSoftwareUpdate.log and see the output of the script on your test machine so you can see how the installcheck script logic is working. Again, this is a very basic Install Check script, so you may want to explore something more robust and/or set it up to not downgrade the client if it automatically updates?
With regards to your second scenario, one option is you could use the post-install script to echo the entire contents of the XML to a file in the correct place. This basically embeds the XML into the catalog entry for that app install and can lay it down when the install runs. Short of that, you have 2 options:
TommyThomassen --
I was playing around and I think you can also do this a second way:
1) Rename the plist/pkg files before you upload them
2) Modify the plist:
<key>installs</key>
<array>
<dict>
<key>CFBundleIdentifier</key>
<string>com.paloaltonetworks.GlobalProtect</string>
<key>CFBundleName</key>
<string>GlobalProtect</string>
<key>CFBundleShortVersionString</key>
<string>5.0.2-13</string>
<key>minosversion</key>
<string>10.10.0</string>
<key>path</key>
<string>/Applications/GlobalProtect.app</string>
<key>type</key>
<string>application</string>
<key>version_comparison_key</key>
<string>CFBundleShortVersionString</string>
</dict>
</array>
Thanks very much for the tip.
At least the plist file was better, so versioning is ok when uploading the pkg file.
However it does not seem to detect it being installed, so setting Auto deployed caused it to reinstall over and over.
I tried with the verification script, but I need to test more.
Not very experienced in macOS scripting. Thanks again for the pointers
Hello Tommy,
Did you have success with correct detection version of GlobalProtect agent (after modify .plist) ?
Newbie with macOS here, :smileyplain: .
Best regards
Uiliam Mello
Hi.
Yes, the GlobalProtect file was detected correctly after modifying the .plist.
I had tried before, but I forgot to modify version in all places. Just follow the lead above, and it should work.
/Tommy
Hi Tommy,
Did you ever get WS1 to detect that GlobalProtect was installed? I have the same issue where it gets stuck in an installation loop
I think it is working now, I added the Install Check script as mentioned above.
In the beginning it kept removing, and reinstalling over and over. I think it was some delay in the install check script.
Just change VERSION number, and try. Hope it works 🙂
#!/bin/zsh
if [ -f /Applications/GlobalProtect.app/Contents/Info.plist ]
then
VERSION=$(/usr/bin/defaults read /Applications/GlobalProtect.app/Contents/Info.plist CFBundleShortVersionString) ;
if [ $VERSION = "5.1.0-75" ]
then
echo $VERSION
echo "Correct Version Installed - No Install Needed"
exit 1 ;
else
echo $VERSION
echo "Wrong Version - ReInstall"
exit 0 ;
fi
else
echo "Install Required"
echo "Info.plist Not Found"
exit 0 ;
fi