I have talked lots about how App-V 5.0 packages integrate so tightly with our client machines and how the App-V stores assets on the platform. In this post I want to clarify where App-V puts stuff, by stuff I mean package related file system and registry assets.
The diagram below explains where our package assets go and when they get created.
File System Staging
As we see from the diagram above, the file system for packages get staged during the add phase into the package installation root, this is a client setting which can be configured, the only restriction on this is that it must be local and cannot be a network path. At publish time we then create the relevant integration points which will allow the application to be run.
Registry Staging
The registry is staged differentially to the file system. As you will know the registry.dat for our application resides inside our .appv package and then is subsequently copied to the cache as explained above during the file system staging.
At add time the only things that get written to registry are around properties of the application however at the same time we find that the registry.dat file is copied into a staging area in %ProgramData%\Microsoft\AppV\Client\VREG:
The reason we do this is stop there ever being an instance where there is a handle on the original registry.dat inside the cache which in turn stops it from being removed. You may find you don’t recognise the name of the .dat as matching the package GUID, this is because the file is actually named as the version GUID of the package it was copied from.
The staging itself however doesn’t actually happen until first launch at which point our staging subsystem jumps in and copies the contents from the .dat hive and propagates the assets to the relevant places in registry. When this is complete you may notice a RegistryStagingFinished flag written out in the same location as the registry itself.