locked
AppV 5.0 SP2 HF4 - Registry not applying when set via DynamicConfig.xml RRS feed

  • Question

  • I have an AppV 5.0 package of VMWare and have tweaked the dynamicconfig.xml file to add a registry key.  I am applying the package with the AppV 5.0 management and publishing server globally.  This is what my dynamicconfig.xml looks like, pulled from the C:\ProgramData\Microsoft... folder (my apologies if it doesn't format well, it does validate):

    <?xml version="1.0"?>
    <DeploymentConfiguration PackageId="7817a78f-feed-4070-8be5-
    ...
    <Registry Enabled="true">
     <Include>
      <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware\VMware Infrastructure Client\Preferences">
       <Value Type="REG_SZ" Name="RecentConnections" Data="wsvcenter20.healthy.bewell.ca,wsvcenter01.healthy.bewell.ca,wsvcenter40.healthy.bewell.ca,wsvcenteribm01.healthy.bewell.ca">
       </Value>
      </Key>
      <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Foo"><Value Type="REG_SZ" Name="Bar" Data="NewValue"></Value></Key><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\EmptyKey">
      </Key>
     </Include>
    </Registry>
    <FileSystem Enabled="true">
    ...
    </UserConfiguration>
    <MachineConfiguration>
     <ProductSourceURLOptOut Enabled="true">      </ProductSourceURLOptOut>
    <Subsystems>
     <Registry>
      <Include>
       <Key Path="\REGISTRY\Machine\Software\Foo"><Value Type="REG_SZ" Name="Bar" Data="Baz">
       </Value>
      </Key>
      <Key Path="\REGISTRY\Machine\Software\EmptyKey">
      </Key>
     </Include>
    </Registry>
    </Subsystems>
    </MachineConfiguration>
    </DeploymentConfiguration>
    

    I left in the example Foo registry just to see if it works.  When I launch vSphere I do not get all the drop downs in the "RecentConnection" keys, opening the AppV 5 package in cmd.exe with the /appvve switch and opening regedit shows the registry keys with the sequenced application, but not the registry keys in the dynamic config.xml.  I should also note I'm trying to replace existing keys that already have the "RecentConnection" that are in the manifest.xml.  So I'm not sure if "Include" is "Replace" and errors out if those keys already exist...?  I don't see any errors in the event log.  I'm not sure of any other way that the event log reports if dynamicconfig.xml is being applied.  

    Lastly, this is what my get-appvclientconfiguration looks like:

    PS C:\Users\trententtye> Get-AppvClientConfiguration
    
    Name                       Value
    ----                       -----
    PackageInstallationRoot    D:\AppVData\PackageInst...
    PackageSourceRoot
    LocationProvider
    AutoLoad                   2
    EnablePackageScripts       1
    ReestablishmentInterval    5
    ReestablishmentRetries     3
    CertFilterForClientSsl     LOCAL_MACHINE\MY\1.3.6....
    SupportBranchCache         0
    VerifyCertificateRevoca... 1
    SharedContentStoreMode     1
    MigrationMode              1
    RoamingFileExclusions
    RoamingRegistryExclusions  SOFTWARE\CLASSES
    AllowHighCostLaunch        0
    PackageStoreAccessControl  0
    IntegrationRootUser        %LOCALAPPDATA%\Microsof...
    IntegrationRootGlobal      %ALLUSERSPROFILE%\Micro...
    VirtualizableExtensions    exe,com,bat,cmd,vbs,ps1...
    IgnoreLocationProvider     0
    ReportingEnabled           0
    ReportingStartTime
    ReportingRandomDelay
    ReportingInterval
    ReportingServerURL
    ReportingDataCacheLimit
    ReportingDataBlockSize
    ExperienceImprovementOptIn 0
    EnablePublishingRefreshUI  0
    ProcessesUsingVirtualCo... {%SystemRoot%\explorer....
    EnableDynamicVirtualiza... 1

    TLDR; My dynamicconfig.xml registry values are not applying.  Help!

    Wednesday, May 7, 2014 1:44 AM

Answers

  • Well...  I think I figured out the cause of my issues.

    NoBackgroundRegistryStaging.

    If I have that registry key set to 0x1 then the registry keys in the deploymentconfig.xml DO NOT apply.  If the registry key is 0x0 or non-existent then the registry keys in deploymentconfig.xml apply appropriately.

    (Notice the EmptyKey and Foo keys)

    Would this be considered a bug to be fixed?  My understanding is this changes when the registry of a package would be processed; so it seems odd that simply being on-demand would cause the registry in deploymentconfig.xml's to not be processed.

    On the other hand, that maybe why the gladiator saw performance increases by enabling that registry key: deploymentconfig.xml's may have been ignored.

    http://blogs.technet.com/b/gladiatormsft/archive/2013/09/25/app-v-on-registry-staging-and-how-it-can-affect-vdi-environments.aspx

    • Marked as answer by TrententMVP Friday, June 20, 2014 6:22 AM
    Friday, June 20, 2014 6:22 AM

All replies

  • Hello,

    Apply this hotfix;http://support.microsoft.com/kb/2956985


    Nicke Källén | The Knack| Twitter: @Znackattack

    Wednesday, May 7, 2014 10:51 AM
  • Hi Nicke, That is the version I have installed.
    Wednesday, May 7, 2014 2:13 PM
  • When adding a package to the App-V Management Console it uses the default configuration XML file from the .AppV file. 

    I assume that if the file in the C:\ProgramData\Microsoft... folder has the modifications it is applied. But please check if your modifications are active by exporting the current config in the Management Console:


    1) Click on the package
    2) Click on Edit next to AD ACCESS
    3) Click on Edit Default
    4) Click on Advanced
    5) Click on Export Configuration

    Open the file to see if your modifications are in the file. If not, do the following:


    If you modify the DeploymentConfig.XML file or the UserConfig.XML you must import this file after adding the package to the Management Console.


    1) Click on the package
    2) Click on Edit next to AD ACCESS
    3) Click on Edit Default
    4) Click on Advanced
    5) Click on Import and Overwrite this Configuration
    6) Select your UserConfig or DeploymentConfig XML file
    7) Click Open
    8) Click on Overwrite


    Good luck!

    • Proposed as answer by znack Friday, May 9, 2014 6:03 AM
    • Unproposed as answer by TrententMVP Monday, May 12, 2014 8:57 PM
    Thursday, May 8, 2014 8:00 AM
  • Hi Ral,

    I did as you described, exporting my default config.xml and I can see my modification is present in the exported file.

    <?xml version="1.0"?>
    <DeploymentConfiguration PackageId="7817a78f-feed-4070-8be5-bdf9447a1539" DisplayName="vSphere_Client_50U3_51U2_55U1" xmlns="http://schemas.microsoft.com/appv/2010/deploymentconfiguration"><UserConfiguration><Subsystems><Shortcuts Enabled="true"><Extensions><Extension Category="AppV.Shortcut"><Shortcut><File>[{Desktop}]\MyApps\VMware\VMware vSphere Client.lnk</File><Target>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe</Target><Icon>[{Windows}]\Installer\{4CFB0494-2E96-4631-8364-538E2AA91324}\arpIcon.exe.0.ico</Icon><Arguments></Arguments><WorkingDirectory>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\</WorkingDirectory><ShowCommand>1</ShowCommand><ApplicationId>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe</ApplicationId></Shortcut></Extension><Extension Category="AppV.Shortcut"><Shortcut><File>[{Programs}]\MyApps\VMware\VMware vSphere Client.lnk</File><Target>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe</Target><Icon>[{Windows}]\Installer\{4CFB0494-2E96-4631-8364-538E2AA91324}\arpIcon.exe.0.ico</Icon><Arguments></Arguments><WorkingDirectory>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\</WorkingDirectory><ShowCommand>1</ShowCommand><ApplicationId>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe</ApplicationId></Shortcut></Extension></Extensions></Shortcuts><FileTypeAssociations Enabled="true"><Extensions></Extensions></FileTypeAssociations><URLProtocols Enabled="true"><Extensions><Extension Category="AppV.URLProtocol"><URLProtocol><Name>VpxClient</Name><ApplicationURLProtocol><Description>URL:VpxClient</Description><DefaultIcon>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe</DefaultIcon><ShellCommands><ShellCommand><ApplicationId>[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe</ApplicationId><Name>open</Name><CommandLine>"[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe" -e "%1"</CommandLine></ShellCommand></ShellCommands></ApplicationURLProtocol></URLProtocol></Extension></Extensions></URLProtocols><COM Mode="Isolated"><IntegratedCOMAttributes InProcessEnabled="false" OutOfProcessEnabled="true"></IntegratedCOMAttributes></COM><Objects Enabled="true"></Objects><Registry Enabled="true"><Include><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]"></Key><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software"></Key><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\EmptyKey"></Key><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Foo"><Value Type="REG_SZ" Name="Bar" Data="NewValue"></Value></Key><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware"></Key><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware\VMware Infrastructure Client"></Key><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware\VMware Infrastructure Client\Preferences"><Value Type="REG_SZ" Name="RecentConnections" Data="wsvcenter20.healthy.bewell.ca,wsvcenter01.healthy.bewell.ca,wsvcenter40.healthy.bewell.ca,wsvcenteribm01.healthy.bewell.ca"></Value></Key></Include></Registry><FileSystem Enabled="true"></FileSystem><Fonts Enabled="true"></Fonts><Services Enabled="true"></Services></Subsystems><Applications><Application Id="[{AppVPackageRoot}]\Virtual Infrastructure Client\Launcher\VpxClient.exe" Enabled="true"><VisualElements><Name>VMware vSphere Client</Name><Icon></Icon><Description></Description></VisualElements></Application></Applications><UserScripts></UserScripts></UserConfiguration><MachineConfiguration><ProductSourceURLOptOut Enabled="true"></ProductSourceURLOptOut><Subsystems><Registry></Registry></Subsystems><MachineScripts></MachineScripts><TerminateChildProcesses></TerminateChildProcesses></MachineConfiguration></DeploymentConfiguration>

    but the registry value's still do not exist when I launch VPXClient.exe or open regedit.exe with the /appvve: command switch.


    • Edited by TrententMVP Monday, May 12, 2014 9:01 PM more informative.
    Monday, May 12, 2014 8:59 PM
  • Wow. You have a lot of extra data;

    <Registry Enabled="true">
    
    <Include><Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]"></Key>
    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software"></Key>
    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\EmptyKey"></Key>
    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Foo">
    	<Value Type="REG_SZ" Name="Bar" Data="NewValue"></Value></Key>
    
    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware"></Key>
    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware\VMware Infrastructure Client"></Key>
    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware\VMware Infrastructure Client\Preferences">
    	<Value Type="REG_SZ" Name="RecentConnections" Data="wsvcenter20.healthy.bewell.ca,wsvcenter01.healthy.bewell.ca,wsvcenter40.healthy.bewell.ca,wsvcenteribm01.healthy.bewell.ca"></Value>
    </Key>
    </Include>
    </Registry>

    Perhaps you can clean it up to be more like this;

    <Registry Enabled="true">
    
    <Include>
    <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\VMware\VMware Infrastructure Client\Preferences">
    	<Value Type="REG_SZ" Name="RecentConnections" Data="wsvcenter20.healthy.bewell.ca,wsvcenter01.healthy.bewell.ca,wsvcenter40.healthy.bewell.ca,wsvcenteribm01.healthy.bewell.ca"></Value>
    </Key>
    </Include>
    </Registry>


    Nicke Källén | The Knack| Twitter: @Znackattack

    Sunday, May 25, 2014 7:34 PM
  • Hi Nicke,

    I originally did have that one line but when it failed to apply I used AVE to and that was the output it produced.

    I tried the XML with the single line again and it still does not replace the existing registry value.

    Monday, May 26, 2014 5:38 AM
  • Hello,

    I just copied and pasted the above into a random apps deployment-config and it showed up great in the registry.

    Used add-appvclientpackage .appv -dynamicdeploymentconfiguration ..deploymentconfig.xml | publish-appvclientpackage -global

    End result;


    Nicke Källén | The Knack| Twitter: @Znackattack

    Monday, May 26, 2014 6:41 PM
  • Hi Nicke,

    I used the exact same command you posted with this application being loaded locally with no luck still.


    Foo and EmptyKey are not present :(
    • Edited by TrententMVP Tuesday, June 3, 2014 9:15 PM little more detail
    Tuesday, June 3, 2014 9:14 PM
  • Hello,
    Did you start regedit within the virtual Environment?

    Nicke Källén | The Knack| Twitter: @Znackattack

    Wednesday, June 4, 2014 8:32 PM
  • Yes, I did.  If I was not in the virtual environment you would not see the "HKCU\Software\VMWare Infrastructure Client" as that software is not natively installed.
    Thursday, June 5, 2014 12:07 AM
  • Hello,

    Sorry, I am just not able to replicate your issue. Perhaps you are doing something different ?


    Nicke Källén | The Knack| Twitter: @Znackattack

    Friday, June 6, 2014 9:48 AM
  • Trentent,

    Just to be clear, you installed HF4 on the CLIENT and rebooted, right?


    Tim Mangan MVP for App-V and Citrix CTP Author of AppV books: "The Client Book" and "OSD Reference Book" (http://www.tmurgent.com/Books )

    Sunday, June 8, 2014 4:04 PM
    Moderator
  • Hi Tim,

    Yes, I have HF4 on the CLIENT and the system has been rebooted numerous times.  I got to meet a MS PFE today who tried to replicate it in his AppV 5.0SP2 HF4 environment and even he was unable to get it to work with his own package using the example registry keys in the xml files.  I have no idea how Nicke was able to get his to work(!?).  Nicke, are you sure you're using HF4?


    • Edited by TrententMVP Thursday, June 12, 2014 9:22 PM
    Thursday, June 12, 2014 9:19 PM
  • Hello,
    Yes, confirmed that my installed bits are HF4.

    Nicke Källén | The Knack| Twitter: @Znackattack

    Thursday, June 12, 2014 9:36 PM
  • I didn't have hotfix 4 installed. After installing it, the Registry subsystem worked.

    Your screenshot above doesn't show whether hotfix 4 is installed or not. If you go to Programs and Features -> View Installed Updates, you should see KB2956985 listed.

    Here's the output in my case:

    Thursday, June 12, 2014 10:18 PM
  • Well...  I think I figured out the cause of my issues.

    NoBackgroundRegistryStaging.

    If I have that registry key set to 0x1 then the registry keys in the deploymentconfig.xml DO NOT apply.  If the registry key is 0x0 or non-existent then the registry keys in deploymentconfig.xml apply appropriately.

    (Notice the EmptyKey and Foo keys)

    Would this be considered a bug to be fixed?  My understanding is this changes when the registry of a package would be processed; so it seems odd that simply being on-demand would cause the registry in deploymentconfig.xml's to not be processed.

    On the other hand, that maybe why the gladiator saw performance increases by enabling that registry key: deploymentconfig.xml's may have been ignored.

    http://blogs.technet.com/b/gladiatormsft/archive/2013/09/25/app-v-on-registry-staging-and-how-it-can-affect-vdi-environments.aspx

    • Marked as answer by TrententMVP Friday, June 20, 2014 6:22 AM
    Friday, June 20, 2014 6:22 AM
  • The only difference between toggling that option is switching registry staging from back pre-staging to on-demand staging at launch. You should know it robs Peter to pay Paul so to speak (to use an ancient metaphor :) )

    If you turn off BackgroundRegistryStaging, it gave you something during publishing, but you paid for it on the back end (it would affect launches.) Ment demonstrated this in his Project VRC demo last TechEd. You could argue HF4 may not need the disabling of registry staging during publishing because there have been imporvements in other areas (Sync with an EXE now instead of that VBS script, etc.)

    Now to the issue at hand: That is not expected behavior and I will be looking into that.


    Steve Thomas, Senior Consultant, Microsoft

    App-V/MED-V/SCVMM/Server App-V/MDOP/AppCompat

    http://blogs.technet.com/gladiatormsft/
    The App-V Team blog: http://blogs.technet.com/appv/
    The MED-V Team Blog: http://blogs.technet.com/medv
    The SCVMM Team blog: http://blogs.technet.com/scvmm/

    “This posting is provided "AS IS" with no warranties, and confers no rights. User assumes all risks.”

    Sunday, June 22, 2014 3:30 AM