Compartilhar via


App-V 5 - How does the Publishing Server Policies Path Work

Hi all,

I’ve been asked this question a few times now how does the custom deployment and user configuration file apply when the App-V 5 client runs a "Sync-AppvPublishingServer"?

For information about our Configuration files have a look at the following link:

https://technet.microsoft.com/itpro/mdop/appv-v5/about-app-v-50-dynamic-configuration

The package that I’m going to be working with to show the use of custom configuration files is Putty and the share location is below. What you will notice if your using custom configuration files then a best practice is to create custom version e.g. _Custom.xml so that you always have the default configuration to revert back to.

PuttyPackage

To apply a custom configuration file, you have to apply it on the Management Server, for the deployment configuration you have to use the "Edit Default Configuration" shown below:

PuttyMgmt

From here you can then select the “Advanced” tab and “Import and Overwrite this Configuration” which provides you an explorer shell where you can specify your custom deployment configuration file.

PuttyMgmtImport

Once the configuration has been saved what happens next? The App-V 5 Management Server writes the custom configuration to the App-V SQL Database.

To see where the data is written to for the package putty, you need to find the PackageVersionID which is specified in the "PackageVersions" table and you can see below it has an ID of 15.

SQL_PV

Now we have the ID, if you open the "PackageEntitlements" table and find the ID 15 in the PackageVersionID table you will in this instance the “Sid” is NULL which means a custom deployment configuration file has been specified.

SQL_PE

In the "UserConfigurationContent" column you will then see the custom deployment configuration xml has been written to the database directly. If you copy the text and paste it into notepad you will see the custom configuration.

Notepad_DC

What happens from here? The App-V Management Server is now waiting for a change to occur so that it can update the PublishingMetadata.xml located:

 C:\ProgramData\Microsoft\AppV\Server\Management

Once the metadata has been updated it will reference the DeploymentConfiguration ConfigurationID 16 which can be seen in the "PackageEntitlements" table seen previously.

Mgmt_PubMetadata

Now to the App-V 5 Client, when you preview the Publishing Server data from the within your browser you will see the configuration for your package and specifically the DeploymentConfiguration for Putty with a Path to a policies string.

ClientPubServer

Note: Make sure your completing the query to publishing server correctly, please review:

https://blogs.technet.com/b/gladiatormsft/archive/2015/10/22/app-v-5-x-client-publishing-server-address.aspx

So what’s the policies string? Is it a link to the deploymentconfig_custom.xml in the file share?

Well the answer is no as already discussed the custom configuration is stored in the SQL database and then referenced in the PublishingMetadata.xml but what does the client do with this information?

You can actually add the path to your browser path as per the below which will show the information stored in the SQL database.

 https://appvserver:8181/policies_344/15/16

ClientPubServerPolicy

Surely the client isn’t going all the way back to the SQL database to get this information?

If you log onto your publishing server or browse to c$ via UNC there is the following path which holds the information from SQL.

 C:\ProgramData\Microsoft\AppV\Server\Publishing\policies_344\15

PubServerPolicyFolder

So when your querying the publishing server from the client what its doing is showing the xml data from the folder above.

I’ve talked about the deployment configuration which affects all users, the same applies for user configuration files except the "Sid" in the "PackageEntitlements" table is populated and the "UserConfigurationContent" only holds user configuration section.

SQL_PE_User

That's how our policies key is populated and functions with the App-V 5 Client. Hope this helps in understanding what the policies path is when you query the publishing server, so when the App-V 5 client runs a "Sync-AppvPublishingServer" the XML above is used when adding or publishing the package.

David Falkus | Senior Premier Field Engineer | Application Virtualization, PowerShell, Windows Shell

Comments

  • Anonymous
    April 26, 2016
    Really great article. Love seeing the 'how it works' type of articles :)
  • Anonymous
    April 26, 2016
    Very Interesting. Thanks for sharing. Hope to see more articles like this :)