Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

About App-V 5.0 Dynamic Configuration

Updated: November 1, 2012

Applies To: Application Virtualization 5.0

You can use the Dynamic Configuration to customize an App-V 5.0 package for a user. Use the following information to create or edit a Dynamic Configuration file.

Advanced: Dynamic Configuration

You can use Dynamic Configuration to customize an App-V 5.0 package for a user. Before you customize a package, you must create the Dynamic User Configuration.xml file or the Dynamic Deployment Configuration file. The file creation and modification procedure is an advanced manual operation. The files are created automatically by the Sequencer and you can use the following information to edit the files.

Dynamic Configuration file contents

When a Dynamic Configuration file is applied, the file modifies the settings associated with the App-V 5.0 package when it is deployed to a computer running the App-V 5.0 client. The Dynamic User Configuration file should include all necessary changes such as additions, deletions, and updates.

The following list displays the two types:

  • User Configuration File (UserConfig) – Allows you to specify or modify custom settings for a package. These settings will be applied for a specific user when the package is deployed to a computer running the App-V 5.0 client.

  • Deployment Configuration File (DeploymentConfig) – Allows you to specify or modify the default settings for a package. These settings will be applied for all users when a package is deployed to a computer running the App-V 5.0 client.

To customize the settings for a package for a specific set of users on a computer or to make changes that will be applied to local user locations such as HKCU, the UserConfig file should be used. To modify the default settings of a package for all users on a machine or to make changes that will be applied to global locations such as HKEY_LOCAL_MACHINE and the all users folder, the DeploymentConfig file should be used.

The UserConfig file provides configuration settings that can be applied to a single user without affecting any other users on a client:

  • Extensions that will be integrated into the native system per user:- shortcuts, File-Type associations, URL Protocols, AppPaths, Software Clients and COM

  • Virtual Subsystems:- Application Objects, Environment variables, Registry modifications, Services and Fonts

  • Scripts (User context only)

  • Managing Authority (for controlling co-existence of package with App-V 4.6)

The DeploymentConfig file provides configuration settings in two sections, one relative to the machine context and one relative to the user context providing the same capabilities listed in the UserConfig list above:

  • All UserConfig settings above

  • Extensions that can only be applied globally for all users

  • Virtual Subsystems that can be configured for global machine locations e.g. registry

  • Product Source URL

  • Scripts (Machine context only)

  • Controls to Terminate Child Processes

File structure

The structure of the App-V 5.0 Dynamic Configuration file is explained in the following section.

Dynamic User Configuration file

Header - the header of a dynamic user configuration file is as follows:

<?xml version="1.0" encoding="utf-8"?><UserConfiguration PackageId="1f8488bf-2257-46b4-b27f-09c9dbaae707" DisplayName="Reserved" xmlns="http://schemas.microsoft.com/appv/2010/userconfiguration">

The PackageId is the same value as exists in the Manifest file.

Body - the body of the Dynamic User Configuration file can include all the app extension points that are defined in the Manifest file, as well as information to configure virtual applications. There are four subsections allowed in the body:

  1. Applications - All app-extensions that are contained in the Manifest file within a package are assigned with an Application ID, which is also defined in the manifest file. This allows you to enable or disable all the extensions for a given application within a package. The Application ID must exist in the Manifest file or it will be ignored.

    <UserConfiguration PackageId="1f8488bf-2257-46b4-b27f-09c9dbaae707" DisplayName="Reserved" xmlns="http://schemas.microsoft.com/appv/2010/userconfiguration">



    <Applications>



    <!-- No new application can be defined in policy. AppV Client will ignore any application ID that is not also in the Manifest file -->



    <Application Id="{a56fa627-c35f-4a01-9e79-7d36aed8225a}" Enabled="false">



    </Application>



    </Applications>







    </UserConfiguration>





  2. Subsystems - AppExtensions and other subsystems are arranged as subnodes under the <Subsystems>:

    <UserConfiguration PackageId="1f8488bf-2257-46b4-b27f-09c9dbaae707" DisplayName="Reserved" xmlns="http://schemas.microsoft.com/appv/2010/userconfiguration">



    <Subsystems>



    ..



    </Subsystems>



    ..



    </UserConfiguration>



    Each subsystem can be enabled/disabled using the “Enabled” attribute. Below are the various subsystems and usage samples.

    Extensions:

    Some subsystems (Extension Subsystems) control Extensions. Those subsystems are:- shortcuts, File-Type associations, URL Protocols, AppPaths, Software Clients and COM

    Extension Subsystems can be enabled and disabled independently of the content.  Thus if Shortcuts are enabled, The client will use the shortcuts contained within the manifest by default. Each Extension Subsystem can contain an <Extensions> node. If this child element is present, the client will ignore the content in the Manifest file for that subsystem and only use the content in the configuration file.

    Example using the shortcuts subsystem:

    1. If the user defined this in either the dynamic or deployment config file:



                                   <Shortcuts  Enabled="true">



                                               <Extensions>



                                                ...



                                               </Extensions>



                                   </Shortcuts>



                        Content in the manifest will be ignored.   



    2. If the user defined only the following:



                                  <Shortcuts  Enabled="true"/>



                        Then the content in the Manifest will be integrated during publishing.



    3. If the user defines the following



                                 <Shortcuts  Enabled="true">



                                               <Extensions/>



                                   </Shortcuts>



    Then all the shortcuts within the manifest will still be ignored. There will be no shortcuts integrated.

    The supported Extension Subsystems are:

    Shortcuts: This controls shortcuts that will be integrated into the local system. Below is a sample with 2 shortcuts:

    <Subsystems>



    <Shortcuts Enabled="true">



      <Extensions>



        <Extension Category="AppV.Shortcut">



          <Shortcut>



            <File>[{Common Programs}]\Microsoft Contoso\Microsoft ContosoApp Filler 2010.lnk</File>



            <Target>[{PackageRoot}]\Contoso\ContosoApp.EXE</Target>



            <Icon>[{Windows}]\Installer\{90140000-0011-0000-0000-0000000FF1CE}\inficon.exe</Icon>



            <Arguments />



            <WorkingDirectory />



            <AppUserModelId>ContosoApp.Filler.3</AppUserModelId>



            <Description>Fill out dynamic forms to gather and reuse information throughout the organization using Microsoft ContosoApp.</Description>



            <Hotkey>0</Hotkey>



            <ShowCommand>1</ShowCommand>



            <ApplicationId>[{PackageRoot}]\Contoso\ContosoApp.EXE</ApplicationId>



          </Shortcut>



      </Extension>



      <Extension Category="AppV.Shortcut">



        <Shortcut>



          <File>[{AppData}]\Microsoft\Contoso\Recent\Templates.LNK</File>



          <Target>[{AppData}]\Microsoft\Templates</Target>



          <Icon />



          <Arguments />



          <WorkingDirectory />



          <AppUserModelId />



          <Description />



          <Hotkey>0</Hotkey>



          <ShowCommand>1</ShowCommand>



          <!-- Note the ApplicationId is optional -->



        </Shortcut>



      </Extension>



     </Extensions>



    </Shortcuts>



    File-Type Associations: Associates File-types with programs to open by default as well as setup the context menu. (MIME types can also be setup using this susbsystem). Sample File-type Association is below:



    <FileTypeAssociations Enabled="true">



    <Extensions>



      <Extension Category="AppV.FileTypeAssociation">



        <FileTypeAssociation>



          <FileExtension MimeAssociation="true">



          <Name>.docm</Name>



          <ProgId>contosowordpad.DocumentMacroEnabled.12</ProgId>



          <PerceivedType>document</PerceivedType>



          <ContentType>application/vnd.ms-contosowordpad.document.macroEnabled.12</ContentType>



          <OpenWithList>



            <ApplicationName>wincontosowordpad.exe</ApplicationName>



          </OpenWithList>



         <OpenWithProgIds>



            <ProgId>contosowordpad.8</ProgId>



          </OpenWithProgIds>



          <ShellNew>



            <Command />



            <DataBinary />



            <DataText />



            <FileName />



            <NullFile>true</NullFile>



            <ItemName />



            <IconPath />



            <MenuText />



            <Handler />



          </ShellNew>



        </FileExtension>



        <ProgId>



           <Name>contosowordpad.DocumentMacroEnabled.12</Name>



            <DefaultIcon>[{Windows}]\Installer\{90140000-0011-0000-0000-0000000FF1CE}\contosowordpadicon.exe,15</DefaultIcon>



            <Description>Blah Blah Blah</Description>



            <FriendlyTypeName>[{FOLDERID_ProgramFilesX86}]\Microsoft Contoso 14\res.dll,9182</FriendlyTypeName>



            <InfoTip>[{FOLDERID_ProgramFilesX86}]\Microsoft Contoso 14\res.dll,1424</InfoTip>



            <EditFlags>0</EditFlags>



            <ShellCommands>



              <DefaultCommand>Open</DefaultCommand>



              <ShellCommand>



                 <ApplicationId>{e56fa627-c35f-4a01-9e79-7d36aed8225a}</ApplicationId>



                 <Name>Edit</Name>



                 <FriendlyName>&Edit</FriendlyName>



                 <CommandLine>"[{PackageRoot}]\Contoso\WINcontosowordpad.EXE" /vu "%1"</CommandLine>



              </ShellCommand>



              </ShellCommand>



                <ApplicationId>{e56fa627-c35f-4a01-9e79-7d36aed8225a}</ApplicationId>



                <Name>Open</Name>



                <FriendlyName>&Open</FriendlyName>



                <CommandLine>"[{PackageRoot}]\Contoso\WINcontosowordpad.EXE" /n "%1"</CommandLine>



                <DropTargetClassId />



                <DdeExec>



                  <Application>mscontosowordpad</Application>



                  <Topic>ShellSystem</Topic>



                  <IfExec>[SHELLNOOP]</IfExec>



                  <DdeCommand>[SetForeground][ShellNewDatabase "%1"]</DdeCommand>



                </DdeExec>



              </ShellCommand>



            </ShellCommands>



          </ProgId>



         </FileTypeAssociation>



       </Extension>



      </Extensions>



      </FileTypeAssociations>



    URL Protocols: This controls the URL Protocols that are integrated into the local registry of the client machine e.g. “mailto:”.



    <URLProtocols Enabled="true">



    <Extensions>



    <Extension Category="AppV.URLProtocol">



    <URLProtocol>



      <Name>mailto</Name>



      <ApplicationURLProtocol>



      <DefaultIcon>[{ProgramFilesX86}]\Microsoft Contoso\Contoso\contosomail.EXE,-9403</DefaultIcon>



      <EditFlags>2</EditFlags>



      <Description />



      <AppUserModelId />



      <FriendlyTypeName />



      <InfoTip />



    <SourceFilter />



      <ShellFolder />



      <WebNavigableCLSID />



      <ExplorerFlags>2</ExplorerFlags>



      <CLSID />



      <ShellCommands>



      <DefaultCommand>open</DefaultCommand>



      <ShellCommand>



      <ApplicationId>[{ProgramFilesX86}]\Microsoft Contoso\Contoso\contosomail.EXE</ApplicationId>



      <Name>open</Name>



      <CommandLine>[{ProgramFilesX86}\Microsoft Contoso\Contoso\contosomail.EXE" -c OEP.Note /m "%1"</CommandLine>



      <DropTargetClassId />



      <FriendlyName />



      <Extended>0</Extended>



      <LegacyDisable>0</LegacyDisable>



      <SuppressionPolicy>2</SuppressionPolicy>



       <DdeExec>



      <NoActivateHandler />



      <Application>contosomail</Application>



      <Topic>ShellSystem</Topic>



      <IfExec>[SHELLNOOP]</IfExec>



      <DdeCommand>[SetForeground][ShellNewDatabase "%1"]</DdeCommand>



      </DdeExec>



      </ShellCommand>



      </ShellCommands>



      </ApplicationURLProtocol>



      </URLProtocol>



      </Extension>



      </Extension>



      </URLProtocols>



    Software Clients: Allows the app to register as an Email client, news reader, media player and makes the app visible in the Set Program Access and Computer Defaults UI. In most cases you should only need to enable and disable it. There is also a control to enable and disable the email client specifically if you want the other clients still enabled except for that client.



    <SoftwareClients Enabled="true">



      <ClientConfiguration EmailEnabled="false" />



    </SoftwareClients>



    AppPaths:- If an application for example contoso.exe is registered with an apppath name of “myapp”, it allows you type “myapp” under the run menu and it will open contoso.exe.



    <AppPaths Enabled="true">



    <Extensions>



    <Extension Category="AppV.AppPath">



    <AppPath>



      <ApplicationId>[{ProgramFilesX86}]\Microsoft Contoso\Contoso\contosomail.EXE</ApplicationId>



      <Name>contosomail.exe</Name>



      <ApplicationPath>[{ProgramFilesX86}]\Microsoft Contoso\Contoso\contosomail.EXE</ApplicationPath>



      <PATHEnvironmentVariablePrefix />



      <CanAcceptUrl>false</CanAcceptUrl>



      <SaveUrl />



    </AppPath>



    </Extension>



    </Extensions>



    </AppPaths>



    COM: Allows an Application register Local COM servers. Mode can be Integration, Isolated or Off. When Isol.



    <COM Mode="Isolated"/>



    Other Settings:



    In addition to Extensions, other subsystems can be enabled/disabled and edited:

    Virtual Kernel Objects:

    <Objects Enabled="false" />



    Virtual Registry: Used if you want to set a registry in the Virtual Registry within HKCU



    <Registry Enabled="true">



    <Include>



    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\ABC">



    <Value Type="REG_SZ" Name="Bar" Data="NewValue" />



     </Key>



      <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\EmptyKey" />



     </Include>



    <Delete>



      </Registry>



    Virtual File System



          <FileSystem Enabled="true" />



    Virtual Fonts



          <Fonts Enabled="false" />



    Virtual Environment Variables



    <EnvironmentVariables Enabled="true">



    <Include>



           <Variable Name="UserPath" Value="%path%;%UserProfile%" />



           <Variable Name="UserLib" Value="%UserProfile%\ABC" />



           </Include>



          <Delete>



           <Variable Name="lib" />



            </Delete>



            </EnvironmentVariables>



    Virtual services



          <Services Enabled="false" />

  3. UserScripts – Scripts can be used to setup or alter the virtual environment as well as execute scripts at time of deployment or removal, before an application executes, or they can be used to “clean up” the environment after the application terminates. Please reference a sample User configuration file that is output by the sequencer to see a sample script. The Scripts section below provides more information on the various triggers that can be used.

  4. ManagingAuthority – Can be used when 2 versions of your package are co-existing on the same machine, one deployed to App-V 4.6 and the other deployed on App-V 5.0. To Allow App-V vNext to take over App-V 4.6 extension points for the named package enter the following in the UserConfig file (where PackageName is the Package GUID in App-V 4.6:

    <ManagingAuthority TakeoverExtensionPointsFrom46="true" PackageName="032630c0-b8e2-417c-acef-76fc5297fe81" />

Dynamic Deployment Configuration file

Header - The header of a Deployment Configuration file is as follows:

<?xml version="1.0" encoding="utf-8"?><DeploymentConfiguration PackageId="1f8488bf-2257-46b4-b27f-09c9dbaae707" DisplayName="Reserved" xmlns="http://schemas.microsoft.com/appv/2010/deploymentconfiguration">

The PackageId is the same value as exists in the manifest file.

Body - The body of the deployment configuration file includes two sections:

  • User Configuration section –allows the same content as the User Configuration file described in the previous section. When the package is published to a user, any appextensions configuration settings in this section will override corresponding settings in the Manifest within the package unless a user configuration file is also provided. If a UserConfig file is also provided, it will be used instead of the User settings in the deployment configuration file. If the package is published globally, then only the contents of the deployment configuration file will be used in combination with the manifest.

  • Machine Configuration section–contains information that can be configured only for an entire machine, not for a specific user on the machine. For example, HKEY_LOCAL_MACHINE registry keys in the VFS.

<DeploymentConfiguration PackageId="1f8488bf-2257-46b4-b27f-09c9dbaae707" DisplayName="Reserved" xmlns="http://schemas.microsoft.com/appv/2010/deploymentconfiguration">

<UserConfiguration>

  ..

</UserConfiguration>

<MachineConfiguration>

..

</MachineConfiguration>

..

</MachineConfiguration>

</DeploymentConfiguration>

User Configuration - use the previous Dynamic User Configuration file section for information on settings that are provided in the user configuration section of the Deployment Configuration file.

Machine Configuration - the Machine configuration section of the Deployment Configuration File is used to configure information that can be set only for an entire machine, not for a specific user on the computer. For example, HKEY_LOCAL_MACHINE registry keys in the Virtual Registry. There are four subsections allowed in under this element

  1. Subsystems - AppExtensions and other subsystems are arranged as subnodes under <Subsystems>:



    <MachineConfiguration>



      <Subsystems>



      ..



      </Subsystems>



    ..



    </MachineConfiguration>



    The following section displays the various subsystems and usage samples.

    Extensions:



    Some subsystems (Extension Subsystems) control Extensions which can only apply to all users. The subsystem is application capabilities. Because this can only apply to all users, the package must be published globally in order for this type of extension to be integrated into the local system. The same rules for controls and settings that apply to the Extensions in the User Configuration also apply to those in the MachineConfiguration section.



    Application Capabilities: Used by default programs in windows operating system Interface. Allows an application to register itself as capable of opening certain file extensions, as a contender for the start menu internet browser slot, as capable of opening certain windows MIME types.  This extension also makes the virtual application visible in the Set Default Programs UI.:



    <ApplicationCapabilities Enabled="true">



      <Extensions>



       <Extension Category="AppV.ApplicationCapabilities">



        <ApplicationCapabilities>



         <ApplicationId>[{PackageRoot}]\LitView\LitViewBrowser.exe</ApplicationId>



         <Reference>



          <Name>LitView Browser</Name>



          <Path>SOFTWARE\LitView\Browser\Capabilities</Path>



         </Reference>



       <CapabilityGroup>



        <Capabilities>



         <Name>@[{ProgramFilesX86}]\LitView\LitViewBrowser.exe,-12345</Name>



         <Description>@[{ProgramFilesX86}]\LitView\LitViewBrowser.exe,-12346</Description>



         <Hidden>0</Hidden>



         <EMailSoftwareClient>Lit View E-Mail Client</EMailSoftwareClient>



         <FileAssociationList>



          <FileAssociation Extension=".htm" ProgID="LitViewHTML" />



          <FileAssociation Extension=".html" ProgID="LitViewHTML" />



          <FileAssociation Extension=".shtml" ProgID="LitViewHTML" />



         </FileAssociationList>



         <MIMEAssociationList>



          <MIMEAssociation Type="audio/mp3" ProgID="LitViewHTML" />



          <MIMEAssociation Type="audio/mpeg" ProgID="LitViewHTML" />



         </MIMEAssociationList>



        <URLAssociationList>



          <URLAssociation Scheme="http" ProgID="LitViewHTML.URL.http" />



         </URLAssociationList>



         </Capabilities>



      </CapabilityGroup>



       </ApplicationCapabilities>



      </Extension>



    </Extensions>



    </ApplicationCapabilities>



    Other Settings:



    In addition to Extensions, other subsystems can be edited:



    Machine Wide Virtual Registry: Used when you want to set a registry key in the virtual registry within HKEY_Local_Machine



    <Registry>



    <Include>



      <Key Path="\REGISTRY\Machine\Software\ABC">



        <Value Type="REG_SZ" Name="Bar" Data="Baz" />



       </Key>



      <Key Path="\REGISTRY\Machine\Software\EmptyKey" />



     </Include>



    <Delete>



    </Registry>



    Machine Wide Virtual Kernel Objects



    <Objects>



    <NotIsolate>



       <Object Name="testObject" />



     </NotIsolate>



    </Objects>

  2. ProductSourceURLOptOut: Indicates whether the URL for the package can be modified globally through PackageSourceRoot (to support branch office scenarios). Default is false and the setting change takes effect on the next launch.  



    <MachineConfiguration>



      .. 



      <ProductSourceURLOptOut Enabled="true" />



      ..



    </MachineConfiguration>

  3. MachineScripts – Package can be configured to execute scripts at time of deployment, publishing or removal. Please reference a sample deployment configuration file that is generated by the sequencer to see a sample script. The Scripts section below provides more information on the various triggers that can be used

  4. TerminateChildProcess:- An application executable can be specified, whose child processes will be terminated when the application exe process is terminated.



    <MachineConfiguration>



      ..   



      <TerminateChildProcesses>



        <Application Path="[{PackageRoot}]\Contoso\ContosoApp.EXE" />



        <Application Path="[{PackageRoot}]\LitView\LitViewBrowser.exe" />



        <Application Path="[{ProgramFilesX86}]\Microsoft Contoso\Contoso\contosomail.EXE" />



      </TerminateChildProcesses>



      ..



    </MachineConfiguration>

Scripts

The following table describes the various script events and the context under which they can be run.

 

Script Execution Time Can be specified in Deployment Configuration Can be specified in User Configuration Can run in the Virtual Environment of the package Can be run in the context of a specific application Runs in system/user context: (Deployment Configuration, User Configuration)

AddPackage

X

(SYSTEM, N/A)

PublishPackage

X

X

(SYSTEM, User)

UnpublishPackage

X

X

(SYSTEM, User)

RemovePackage

X

(SYSTEM, N/A)

StartProcess

X

X

X

X

(User, User)

ExitProcess

X

X

X

(User, User)

StartVirtualEnvironment

X

X

X

(User, User)

TerminateVirtualEnvironment

X

X

(User, User)

Create a Dynamic Configuration file using an App-V 5.0 Manifest file

You can create the Dynamic Configuration file using one of three methods: either manually, using the App-V 5.0 Management Console or sequencing a package, which will be generated with 2 sample files.

For more information about how to create the file using the App-V 5.0 Management Console see, How to Create a Custom Configuration File Using the App-V 5.0 Management Console.

To create the file manually, the information above in previous sections can be combined into a single file. We recommend you use files generated by the sequencer.

See Also

-----
You can learn more about MDOP in the TechNet Library, search for troubleshooting on the TechNet Wiki, or follow us on Facebook or Twitter.
-----
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.