App-V 5 package Dynamic Configuration
Virtual application packages contain a manifest that provides all the core information for the package. This information includes the defaults settings for the package and determines settings in the most basic form.
If you want to adjust these defaults for a particular user or group, you can create and edit the following files:
- User Configuration .xml file
- Deployment configuration .xml file
All of the additions, deletions, and updates in the configuration files need to be made in relation to the default values specified by the package's manifest.
The table below represents how the files will be read. The first entry represents what will be read last, therefore, its content takes precedence. Therefore, all packages inherently contain and provide default settings from the package manifest.
If a deployment configuration .xml file with customized settings is applied, it will override the package manifest defaults. If a user configuration .xml file with customized settings is applied after that, it will override both the deployment configuration and the package manifest defaults.
3. User Configuration .xml file
2. Deployment Configuration .xml file
1. Package Manifest (stored inside the .appv file)
User Configuration File (UserConfig): Lets you to specify or modify custom settings in a package. These settings will be applied for a specific user when the package is deployed to a computer running App-V 5.0.
Deployment Configuration File (DeploymentConfig): Lets you to specify or modify the default settings in a package. These settings will be applied for all users when a package is deployed to a computer running App-V 5.0.
The App-V sequencer produces an MSI package by default as part of its output. This is a wrapper that runs the necessary commands to publish and remove the virtual application.
A big limitation of these MSI packages however, is that they ignore the DeploymentConfig.xml file (the UserConfig.xml file is irrelevant since the MSI publishes the app globally to all users). This means that if you want to modify any package settings, or add some package scripts, then you need a separate process to import these custom configurations and re-publish the applications with Powershell commands.
To Enable Scripts to run
Scripts execution is disabled by default. so that you, the admin, can make a conscious decision that scripting is still a necessary part of your AppV environment.
If you want scripts to run in your environment you’ll need to enable it for the machines you are targeting. This can be done by setting the client configuration setting “EnablePackageScripts”.
This can be done at install time, through group policy or through powershell. Here is how you would do it in powershell:
PS > Set-AppvClientConfiguration -EnablePackageScripts $true