Changes
Fixed upgrade process to handle patch changes and removal process to handle the case where the package has already been removed some other way.
<install cmd="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; if (add-appvclientpackage -path $env:PKG_PATH | publish-appvclientpackage -Global | mount-appvclientpackage ) { exit 0 } else { exit 1 }"" condition="exitcodeequalto" />
<upgrade includecmd="installpowershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; unpublish-appvclientpackage $env:PKG_SHORTNAME; remove-appvclientpackage $env:PKG_SHORTNAME" > <exit code="any"/> </upgrade> <upgrade cmd="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; if (add-appvclientpackage -path $env:PKG_PATH | publish-appvclientpackage -Global | mount-appvclientpackage ) { exit 0 } else { exit 1 }"" condition="exitcodeequalto" />
<remove cmd="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; unpublish-appvclientpackage $env:PKG_SHORTNAME; remove-appvclientpackage $env:PKG_SHORTNAME" > <exit code="any" /> </remove>
</package>
</source>