MSI, App-V, SCCM, Appsense, Citrix. This blog contains hints and tips on these technologies. Primarily it is an online notebook of items that I may need to refer to in the future, or things I constantly forget!
Friday, April 21, 2017
Adding the RunVirtual key via the DeploymentConfig.xml
The RunVirtual key can be entered via the DeploymentConfig.xml file.
<!-- Machine Scripts Section -->
<MachineScripts>
<PublishPackage>
<Path>REG.EXE</Path>
<Arguments>ADD HKLM\SOFTWARE\Microsoft\AppV\Client\RunVirtual\WINPROJ.EXE /d 36867e23-413f-4f7c-a181-0cc075ad2d1e_ed75245c-bce8-48bc-89de-e63d55c320b6 /f</Arguments>
<Wait RollbackOnError="false" />
</PublishPackage>
<UnpublishPackage>
<Path>C:\Windows\System32\REG.EXE</Path>
<Arguments>DELETE HKLM\SOFTWARE\Microsoft\AppV\Client\RunVirtual\WINPROJ.EXE /f</Arguments>
<Wait RollbackOnError="false" />
</UnpublishPackage>
</MachineScripts>
Note that for this to work the EnablePackageScripts must be set to 1.
Set-AppvClientConfiguration -EnablePacakgeScripts 1
When publishing this globally, the <name>_DeploymentConfig.xml file is specified during the Add-AppvClientPackage action
Add-AppVClientPackage <PathToAppVFile> -DynamicDeploymentConfiguration <PathTo_DeploymentConfiguration,xml>
Not tested but if packages were user published on a citrix platform the UserConfig.xml can carry similar commands and the _UserConfig.xml specified during the publishing command. In this case the user RunVirtual Key would be used? I guess.
Further Deployment Config info
https://docs.microsoft.com/en-us/microsoft-desktop-optimization-pack/appv-v5/about-app-v-50-dynamic-configuration
Key Words
DeploymentConfig
Deployment Configuration
Deployment Config