When you’re using Microsoft App-V 5 to distribute your “virtual” applications it can be cumbersome to apply settings afterwards. With native installed applications you have to ability to update files, registry settings or apply permissions (since App-V 5 always applies default permissions).

Within a virtual application these settings needs to be applied within the virtual environment (often referred to as “the bubble”). Up to App-V 4.x you had the ability to add custom actions in the OSD file, starting App-V 5 this is replaced with Dynamic Configurations.

While Dynamic Configurations are more powerful and flexible then the static OSD files I couldn’t resist to show you how RES Workspace Manager can simplify this.

Dynamic Configurations

Let’s start with diving a bit deeper in the Dynamic Configurations. Basically what’s changed from App-V 4 to App-V 5 is that the information that previously was stored in the OSD file (shortcuts / FTA’s and optionally scripts) are now stored in the main package with an .appv extension. Inside the .appv package a manifest xml file resides containing information that was previously in the OSD file.

Dynamic Configuration files are XML files can be applied to all environments (the Default Configuration) or a certain group of users / computers (a user configuration). Dynamic Configuration files are created automatically when an package is created with the App-V Sequencer: <packagename>_UserConfig.xml and <packagename>_DeploymentConfig.xml.

 

Before you consider using Dynamic Configurations there are some things you should know:

  • They are never applied automatically (unless you use ConfigMgr 2012 SP1)
  • When distributing a package via MSI you cannot use Dynamic Configuration
  • When packages are added via PowerShell the Dynamic Configuration file cannot use HTTP, only SMB
  • When packages are added via PowerShell the Dynamic Configuration file is only read when it’s imported, not on application launch
  • Update: Nathan Sperry commented that you can “re-import” the Dynamic Configuration file with Set-AppvClientPackage
  • Machine settings can only be applied in Deployment Configuration (not in User Configuration)
  • There are two type of assignments for Dynamic Configuration
    • Default Configuration (applies to all clients) = Deployment Configuration
    • User Configuration (applies to a certain scope) = User Configuration
  • This means that when you assign applications to Computers only user settings can be applied unless you assign apply this to all clients in the default configuration

For more information about Dynamic Configurations please read  Deployment Models and Dynamic Configurations in App-V 5 by Falko Gräfe.

 

 

Editing Dynamic Configuration Files

As mentioned earlier the Dynamic Configuration files are XML files that you can edit. Microsoft published an article on TechNet describing the file structure and description (link) which should help you editing the files. It’s limited but it’s no rocket science.

XML Notepad
XML NotepadTo avoid syntax errors in the XML file an XML editor can be used. Microsoft published XML Notepad 2007 which is an free and easy to use tool for editing XML files. As a bonus it comes with XML Diff ( View > Compare XML Files) to compare XML files.

Virtual Engine ACE - GUIVirtual Engine ACE

Editing the Dynamic Configuration files can be tricky. To avoid syntax errors and to ease your life the guys of Virtual Engine created the awesome App-V 5 Configuration Editor (ACE).

 

 

PowerShell

If you import the application via PoserShell the DynamicDeploymentConfiguration parameter can be used to specify the default configuration

Add-AppVClientPackage ‘(path to .appv)’ –DynamicDeploymentConfiguration ‘(path to _DeploymentConfig.xml)’

Note: The path to the .appv file can be via HTTP or SMB, the DeploymentConfg.xml file only via SMB.

If you publish the application via PowerShell the DynamicUserConfiguration parameter can be used to specify the user configuration

Publish-AppVClientPackage –Name ‘(the name of the application)’ –DynamicUserConfiguration ‘(path to _UserConfig.xml)’

Note: The path to the .appv file can be via HTTP or SMB, the UserConfg.xml file only via SMB.

 

 

App-V Management Server

When you’re using a full App-V infrastructure (using a Management and Publishing server) you can use the webconsole to export or import the Dynamic Configuration. Using the full App-V infrastructure it very easy to apply different user settings to different users or groups.

 
Export

If you don’t have the original XML file of the Deployment / User configuration this can be exported from the App-V management database. Once you know how it’s done it’s very easy.

  • In the web console go to the Packages node and select the package. At AD ACESS click on EDIT


    Application Virtualization - Packages - Adobe Reader

  • For Default Configuration click on EDIT DEFAULT
  • For User Configuration click EDIT next to the user assignment


    AD Access - Edit

     

  • Select 4. Advanced and click on Export Configuration


    Default Configuration - Advanced - Export Configuration

     

  • Save the file

 


Object reference not set to an instance of an objectIf you open the exported  Dynamic Configuration  file in Virtual Engine ACE v.1.1.5906 (or earlier) an exception is raised . If you open the exported  Dynamic Configuration  file in Virtual Engine ACE v.1.1.5906 (or earlier) an exception is raised . The guys at Virtual Engine are working on a new release (I will update this article when this is available). For the time being the problem can be mitigated by changing two lines in the XML file. Changes are in Bold.

From

<?xml version=”1.0″?><DeploymentConfiguration PackageId=”84e7f166-5ccc-48b1-a81a-fd7d74051f15″ DisplayName=”Google Chrome” xmlns=”https://schemas.microsoft.com/appv/2010/deploymentconfiguration“>

To

lt;?xml version=”1.0″ encoding=”utf-8″?><DeploymentConfiguration PackageId=”84e7f166-5ccc-48b1-a81a-fd7d74051f15″ DisplayName=”Google Chrome” xmlns=”https://schemas.microsoft.com/appv/2010/deploymentconfigurationIgnorableNamespaces=”” >

You’ll still see an exception, just click on Continue and the application will work as expected.


 

Import

The procedure to import the Dynamic Configuration is similar like exporting. The initial steps are equal except for the last step where you click on Import an Overwrite this Configuration.Default Configuration - Advanced - Import and Overwrite this Configuration

Possible you’ll see the following error:

The configuration file did not contain well formed AppV configuration XML. Please check the management server event log for more information.

This error is displayed when:

  • you provide a <packagename>_UserConfiguration.xml to a Default configuration
  • you provide a <pacakgename>_DeploymentConfiguration to a User configuration
  • the XML file contains a syntax error

 


If you open the import the Dynamic Configuration  created with Virtual Engine ACE v.1.1.5906 (or earlier) the same error is shown. This is because the App-V Management server considers comments and an invalid syntax Confused smile . The guys at Virtual Engine are working on a new release (I will update this article when this is available). For the time being the problem can be mitigated by removing the comment in the XML file.


 

RES Workspace Manager

Applying Dynamic Configuration to App-V packages require quite a lot of effort, especially when you need to troubleshoot (as the logging in App-V is extensive but ridiculously complex). It’s important that you document properly so you can maintain the application during it’s lifecycle.

Enter RES Workspace Manager (WM). With RES WM you can manage the users environment including it’s application. In all editions the Application Virtualization Integration feature is available (part of the composition and personalization module) is available which allows you to apply custom actions within the virtual environment (“the bubble”).

The benefit of using RES WM to manager your App-V applications are:

  • A graphical interface is available to apply custom actions
  • Custom actions can be applied to specific users or devices (context)
  • Easy to document using Instant Report
  • Easy to export / import using Building Blocks (for instance to stage from D > T > A > P)
  • Dynamic Privileges. Add (or remove) administrative privileges per application. Application Virtualization helps you with application interoperability not application compatibility.

 

Example

Let’s assume you need to change the ACL on folders of an App-V package. Dan Gough wrote an detailed article explaining the differences between App-V 4 and 5 including a VBscript which grants the owner of the users local appdata folder write access (Full Control).

Instead of using a Dynamic Configuration to run the VBscript I use an Action to run the script in RES Workspace Manager.

Edit application - Google ChromeEdit application - Google Chrome - ConfigurationEdit application - Google Chrome - Edit Command - PropertiesEdit application - Google Chrome - Edit Command - Script

Alternatively you could have chosen to inject a token in the process to grant Administrative privileges to this user.

Edit application - Google Chrome - Dynamic Priviliges

Note: App-V 5 integration is available since RES WM 2012 SR3.

 

 

 

.

4 Reacties

  1. Thanks for mentioning ACE in the article and another great blog. I would certainly advocate using RES Workspace Manager to make things a whole lot easier!!.

    One thing you might like to also mention is when you’ve added and published the application using a Dynamic Configuration XML file (or without one for that matter) with PowerShell, and you then wish modify/apply that XML file, you can use ‘Set-AppvClientPackage –Name -DynamicDeploymentConfiguration | Publish-AppvClientPackage -Global’

    The example above uses the DeploymentConfig.XML and will publish the application to all users ( -Global ).

    The important part is to remember to Publish the application again, otherwise your changes won’t be applied.

    Nathan

  2. Hi Ingmar,

    Sorry for posting to an old post, RES recently improved their AppV 5 integration, but left out support for Dynamic Config files – I raised a support ticket and was told to create a User Voice for adding support if the community wanted the feature.

    I’ve also requested support for HTTPS streaming which is missing from the RES integration.

    Here are the links to the RES User Voice requests, they will only get implemented if RES see’s enough votes from the community.

    https://ressoftware.uservoice.com/forums/166486-res-software-product-ideas/suggestions/6843985-appv-5-dynamicdeploymentconfig-xml-support

    https://ressoftware.uservoice.com/forums/166486-res-software-product-ideas/suggestions/6844010-appv-5-http-s-publishing-support

  3. I am trying to apply a custom deployment config file using app-v management console however I keep getting the following error “the configuration file did not contain well formed app v configuration xml.” as mentioned in ur writeup. However the same config file works perfect when i use powershell installation using -dy command. There is nothing in the server eventlog either.
    I went through your article but could not point out the fault yet.

    Any help is appreciated.

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

Deze site gebruikt Akismet om spam te verminderen. Bekijk hoe je reactie-gegevens worden verwerkt.

nl_NLNederlands