In this brief post I am going to explain the purpose of the PublishingSource registry value in App-V 5.0 and how it works.
PublishingSource can be found in either of the following locations depending on whether the package has been published to the user or published globally:
HKEY_CURRENT_USER\Software\Microsoft\AppV\Client\Packages\{PACKAGE GUID}\Versions\{VERSION GUID}\Catalog
or
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\Packages\{PACKAGE GUID}\Versions\{VERSION GUID}\Catalog
This value in registry is used primarily by App-V Publishing Servers to register ownership of delivery of a package. If the App-V Server delivers an App-V package you should see something similar to this in registry:
It is via this PublishingSource value that the App-V Publishing Server comes to know whether it has authority over a package or not. A Publishing Server will never unpublish a package if it is not listed in PublishingSource. A simple way to observe this behaviour is to remove the data from the value and try and unpublish the package, the package will essentially become orphaned and remain on the machine. The publishing server however will retake ownership should you ever re-publish the package.
Both Standalone mode and SCCM leave the PublishingSource value empty upon publish of an App-V Package.
Standalone mode negates ownership of delivery in its nature. This also means packages that are delivered in standalone mode will not be removed by a publishing refresh with App-V full infrastructure.
SCCM 2012 has its own way of tracking ownership of App-V packages and it holds record of this in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\VirtualAppPackages
Here you find a maintained list of all App-V packages and their relevant properties.
One of the key values in here is the App Delivery Type Id which contains unique GUIDs identifying the scope and deployment type, SCCM uses these to understand whether or not a deployment is present and what it’s status is.
You can find reference for this check in the AppDiscovery.log when a deployment is being assessed for delivery:
Its for this reason you should not use stand alone mode to remove an App-V package that has been delivered via SCCM 2012 as it will not clean up these references and SCCM will believe the package is still present on the machine.