VMware Workspace ONE Community
TommyThomassen
Enthusiast
Enthusiast
Jump to solution

Deploy macOS PKG files, with XML file and using VMware AirWatch Admin Assistant

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

Labels (1)
1 Solution

Accepted Solutions
rterakedis
VMware Employee
VMware Employee
Jump to solution

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:

  • Modify the value for the name if you want
  • Modify the value for the installer_item_location
  • Change the version to 5.0.2-13 (or whatever version is current -- keep the hyphen for build number)
  • Add an Installs array as follows

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

View solution in original post

0 Kudos
9 Replies
BenByCegeka
Contributor
Contributor
Jump to solution

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

0 Kudos
TommyThomassen
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos
rterakedis
VMware Employee
VMware Employee
Jump to solution

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:

  • GlobalProtect-5.0.2.13.pkg
  • GlobalProtect-5.0.2.13.plist

2).  Change the plist file as such:

  • Modify the value for the "name" key to something your users will recognize.
  • Modify the "installer_item_location" to match the name of the file:   GlobalProtect-5.0.2.13.pkg
  • change the "version" to 5.0.2.13 (or whatever version) as this is what will be reflected in the console.

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:

  1. Repackage the installer to also embed the XML and lay it down where it needs to go.
  2. Package the pkg installer and XML into a DMG file, and then use a process similar to this:    euc-samples/macOS-Samples/3rd-Party_Software_Guidance/Carbon-Black-Defense at master · vmware-sample...
0 Kudos
rterakedis
VMware Employee
VMware Employee
Jump to solution

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:

  • Modify the value for the name if you want
  • Modify the value for the installer_item_location
  • Change the version to 5.0.2-13 (or whatever version is current -- keep the hyphen for build number)
  • Add an Installs array as follows

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

0 Kudos
TommyThomassen
Enthusiast
Enthusiast
Jump to solution

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 Smiley Happy

0 Kudos
UiliamFoschiera
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos
TommyThomassen
Enthusiast
Enthusiast
Jump to solution

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

/Tommy

aboggs
Contributor
Contributor
Jump to solution

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

0 Kudos
TommyThomassen
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos