autopkg / rtrouton-recipes

Recipes for AutoPkg
MIT License
131 stars 93 forks source link

Add postinstall script for VMWare Horizons PKG recipe #139

Closed cumcitjamfadmin closed 1 year ago

cumcitjamfadmin commented 2 years ago

Can a postinstall script be added for the .pkg recipe found at https://github.com/autopkg/rtrouton-recipes/tree/master/VMwareHorizonClient? Armin does this for his .munki recipe at https://github.com/autopkg/scriptingosx-recipes/blob/master/VMwareHorizonClient/VMwareHorizonClient.munki.recipe, and the script would just need to be:

!/bin/sh

/Applications/VMware\ Horizon\ Client.app/Contents/Library/InitUsbServices.tool

If this command isn't run after install, when a user launches the app they'll get two error messages (one that admin rights will be required to enable USB Services, and one that the /Applications/VMware\ Horizon\ Client.app/Contents/Library/InitUsbServices.tool file isn't valid and that a legitimate version of the app needs to be downloaded). Running the command avoids both error messages. Alternately the script could be added to your .jss recipe, but since you already add one script to the .pkg recipe I thought it might be easiest to add it there.