Understanding Global Data and User Data directory
As we've reviewed earlier, the App-V client components are not only represented by the applications it receives from the server, this component includes several other elements used to handle App-V operations efficiently. With this are included the Global Data directory and User Data directory.
The Global Data directory is the container where the common computer data is stored and is available for all users in this operating system. The default location is C:\ProgramData\Microsoft\Application Virtualization Client\.
The default folders available in this directory are the SoftGrid Client and Temp folders, along with the sftlog.txt log file.
The SoftGrid Client folder is where all the necessary files are stored; here's a quick look at them:
Sftfs.eld and Sftfs.eld.old: This is a log file used internally in the App-V cache; it is usually used by Microsoft Technical Support to detect possible errors.Sftfs.fsd: This is the App-V client SFT cache. It is a single file used by the App-V client to store all applications used in the computer.Sftfs.fsG: It is also a file related to the App-V client cache, but its use is undocumented at the moment.shortcut_ex.dat: This file is present in both directories, that is, the Global Data and User Data directories. It contains the list of application shortcuts present. This list is updated for every publishing refresh.The file in the Global Data directory is updated when adding a package using SFTMIME ADD PACKAGE with the /Global switch or adding an MSI-based package.
AppFS Storage folder: Within this folder is kept information and personalization made in applications which are not user specific. Not all applications require storing particular computer information.The application-specific data in PKG files will be analyzed later in this chapter.
Icon Cache folder: Stores the icons used in the machine when a package/application is added. This directory is populated in the publishing refresh workflow.There is also an Icon Cache folder created in the User Data directory for the same purpose.
OSD Cache folder: As for the Icon Cache, this is the place where the OSD files of the applications involved and received from a server are stored.Note
If the computer had an earlier version of App-V, we could also see a Resource Cache folder, which is not necessary in this App-V client version.
The User Data directory is the place where the applications store the user profiles associated with each application. Any particular configuration made by a user in an application is kept here.
The default location of the User Data directory is using the system variable %APPDATA%\SoftGrid Client, translated to C:\Users\username\AppData\Roaming\SoftGrid Client.
The folder also includes, as mentioned before, the Icon Cache folder for storing particular user published icons and the shortcut_ex.dat with the list of these icons.
The userinfo.dat file is used for storing each user identity.
We've discussed, in the last two sections, the common data appearing in virtual applications and stored in PKG files. App-V separates these files into two separate directories, Global Data and User Data, representing each change made in the operating system and in the user profile environment of the application.
How does App-V know where to store these changes? In the sequencing phase, each file captured includes a parameter regarding whether it is User Data or Application Data. So any change made to any of these files is stored as PKG in Global Data or User Data directories.
We can review this parameter in the App-V Sequencer using the Files tab:
App-V already has an algorithm to decide whether the file belongs to Application Data or User Data and rarely will we need to change this value while editing a virtual application.
The PKG files created by each application are unique and can be differentiated in these directories, as it is using the package name plus the GUID associated with that package. Using a previous example, the Firefox directory is named FIREFOX6-C06AF524-837-44AC.
Within each package directory, we will also find several files, including two separate PKG files associated with User Data and Global Data. These files are present in the User Data and Global Data directories, respectively.
Here's an example of the Global Data directory of the Mozilla Firefox 6 package:
To understand a little bit more about these GlbVol and UsrVol files, here's an explanation:
UsrVol_sftfs_v1.pkg contains new or modified user-specific data from a system process that is not associated with a specific user context but is associated with a specific package.GlblVol_sftfs_v1_<SID>.pkg contains application-specific files that are modified by any user process in the virtual environment. The SID of the user is appended to the volume name to uniquely identify it.GlblVol_sftfs_v1_S-1-5-20.pkg contains any application-specific data that is modified by a system process. The well-known SID for a system is appended to the volume. User modifications go instead to the application data isolation volume. The global package volume also contains the virtual environment configuration for system processes.GlblVol_sftfs_v1_S-1-5-18.pkg is only created when the package includes processes running in a different context besides the virtual, for example, a Windows service.
Regarding the User Data directory, we can find only one file:
Usrvol_sftfs_v1.pkg contains user-specific files that are modified or new files that are created by any user process in the virtual environment. This volume also contains the virtual environment configuration, as modified by the user.
These files interact in several different ways during the normal processes of virtual applications such as the initial launch, shutdown, upgrade, and so on.
Microsoft developed a complete document where we can evaluate this behavior closely and understand how these files are used during each task.
The following is an example, taken from Microsoft documentation, of processes such as initial launch, shutdown, and subsequent launch:
The process runs as follows:
- When a user launches the virtual application, the TMP files are created in the Global Data directory to store any changes that occur while the application is launched, like we saw in the Firefox 6 package container.
- When initiating a shutdown, the TMP files are merged with their respective locations, global and/or user, as PKG files. These files are stored for subsequent launches to preserve any changes that were made when the application was launched.
- On subsequent launches, the PKG files are copied to TMP files for changes that are made while the application is launched.
We can find more information in the Microsoft document, App-V Application Publishing and Client Interaction, at: http://download.microsoft.com/download/f/7/8/f784a197-73be-48ff-83da-4102c05a6d44/APP-V/AppPubandClientInteraction.docx.