.

 

 

Citrix Profile Management - App-V Integration

This article was intended to be purely about integrating App-V with Citrix Profile Management however it's difficult to provide guidance without a base starting point. This article is based on Windows Server 2016 (Build 1607) and Citrix Profile Management 1811, so keep in mind that best practise and advice does change with Windows / Software / UPM versions.

My plan was to document the

  • Basics of profile management
  • The standard Microsoft roaming profile
  • Move on to Citrix Profile Management (and a recommended approach)
  • Discuss Roaming Profile options for App-V

However after referencing all the various Microsoft and Citrix articles and documents on App-V and Profile Management, I started to realise that there's quite a few contradictions out there which certainly leads to confusion and probably a few arguments. This also made me realise that the phrase 'Best Practise' is not an absolute binary term that applies to all environments equally. 'Best Practise' is what works (well) in your environment. I'll try and stick to the plan, but there's a few diversions along the way.

Basics of Profile management


About User Profiles

That's all true of course except that 'A registry hive' actually consists of two dat files. NTuser.dat located in the root of the user profile and UsrClass.dat located in AppData\Local\Microsoft\Windows.

UsrClass.dat is loaded into the user profile as HKEY_CURRENT_USER\Software\Classes. This registry information is overlayed with HKEY_LOCAL_MACHINE\Software\Classes and HKEY_CLASSES_ROOT provides a consolidated view of the two.


HKEY_CLASSES_ROOT Key

The summary point about usrclass.dat is that it handles per user file extensions. This registry information ties up with HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts which James Rankin explains here.

Christoph Kolbicz's SetUserFTA utility is also worth looking at when managing file extensions.

The standard Microsoft roaming profile

As above: "A roaming user profile is a copy of the local profile that is copied to, and stored on, a server share."

By default, a Microsoft roaming profile will exclude the following directories from roaming:

  • AppData\Local
  • AppData\LocalLow
  • $Recycle.Bin
  • OneDrive
  • Work Folders

This is defined in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ExcludeProfileDirs.

So of course this means that UsrClass.dat which is located in a subfolder of AppData\Local is not intended to be roamed by default.

This makes sense as a user may specify that .doc files should be handled by Microsoft Word, however if the user roams to another computer, where Microsoft Word is not installed, then the .doc class will probably be handled by Wordpad. A better example might be specifying Mozilla Firefox or Google Chrome as the default handler for .html files but the user roams to a computer that only has Internet Explorer available.

Citrix Profile Management

By default, Citrix Profile Management no longer excludes AppData\Local and AppData\LocalLow. This means that out of the box, UsrClass.dat will roam with the user profile. It also means that vast amounts of disposable redundant data will roam with the user profile. I've seen default deployments of Citrix Profile Managment where the smallest user profile is hundreds of MB and the largest is over 4GB. This is after less than 6 months of use.

Of course the silver bullet answer to the inevitable slow logon is to enable Profile Streaming. This setting is incompatible with Microsoft App-V.


Profile Management and App-V


Performance Guidance for Application Virtualization

Going back to the profile bloat issue due to the default Citrix Profile Management configuration I personally take the view that default Microsoft roaming profile exclusions should be added to the Citrix Profile Management policy. When a user or application experience issue is identified, that requires that a subfolder or file within AppData\Local or AppData\LocalLow, the specific file or folder may be included in the Citrix Profile Management policy. It's a lot simpler to add a reduced number of inclusions, than to add a large number of exclusions.

Below is a starter Citrix Profile Management policy resulting in a <15 MB roaming profile. Inclusions in Red are not required as they are already captured as subfolders of AppData\Roaming.

Microsoft Default Exclusions
Exclude folders AppData\Local
AppData\LocalLow
$Recycle.Bin
OneDrive
Work Folders
 
General
Exclude files *.pol
*.log
*.tmp
 
Start Menu
Mirror folders AppData\Local\TileDataLayer\Database Start Menu Layout Roaming on Windows 10
Mirror folders AppData\Local\Microsoft\Windows\Caches Start Menu Shows Blank Icons On VDA
Internet Explorer
Include folders AppData\Local\Microsoft\Credentials
AppData\LocalLow\Sun\Java\Deployment\Security
Appdata\Roaming\Microsoft\Credentials
Appdata\Roaming\Microsoft\Crypto
Appdata\Roaming\Microsoft\Protect
Appdata\Roaming\Microsoft\SystemCertificates

How To: Configure UPM to save password in Internet Explorer

* Use a GPO preference to create folder AppData\Local\Microsoft\Vault

Mirror folders AppData\Local\Microsoft\Vault
AppData\Roaming\Microsoft\Windows\Cookies
AppData\Local\Microsoft\Windows\INetCookies
AppData\Local\Microsoft\Windows\WebCache
Mirror folders AppData\Local\Microsoft\Windows\INetCookies
AppData\Local\Microsoft\Windows\WebCache
AppData\Roaming\Microsoft\Windows\Cookies
Sync Cookies
Citrix
Exclude folder Citrix\GroupPolicy  

Below are further common required inclusions due to the global AppData\Local and AppData\LocalLow folder exclusions.

Java
Include folders Appdata\LocalLow\sun\java\Deployment
AppData\LocalLow\Sun\Java\Deployment\ext
AppData\LocalLow\Sun\Java\Deployment\security
Java Properties not Saved to the User Profile
Include files AppData\LocalLow\Sun\Java\Deployment\deployment.properties
AppData\LocalLow\Sun\Java\Deployment\security\exception.sites
AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
Google Chrome
Mirror folders

AppData\Local\Google\Chrome\User Data\Default\Login Data
AppData\Local\Google\Chrome\User Data\Default\Last Session AppData\Local\Google\Chrome\User Data\First Run
AppData\Local\Google\Chrome\User Data\Local State
AppData\Local\Google\Chrome\User Data\Default\Bookmarks
AppData\Local\Google\Chrome\User Data\Default\Favicons
AppData\Local\Google\Chrome\User Data\Default\History
AppData\Local\Google\Chrome\User Data\Default\Preferences
AppData\Local\Google\Chrome\User Data\Default\Cookies

Google Chrome does not remember user login data
Microsoft Office
Include folder %localappdata%\Microsoft\Office\16.0\Licensing Shared computer activation for Office 365 ProPlus
Include files AppData\Local\Microsoft\Office\*.officeUI How to Save the Toolbar Customization
Mozilla Firefox
Include folders AppData\Roaming\Mozilla\Firefox\Profiles Mozilla Firefox bookmarks not getting saved after logoff and login

A quick way to find additional inclusions and exclusions for specific applications is to check for a UEV template at the Technet Gallery. The templates contain file and registry inclusions and exclusions in xml format and are therefore easy to read.

Roaming Profile options for App-V

The advice from Citrix is:

They only support Global publishing, however if the UserLogonRefresh setting is enabled, disable Profile streaming. Bit of a contradiction.

When following this advice, user publishing still works however any changes made to the application are not preserved because the AppData\Roaming\Microsoft\AppV\Client\Catalog folder gets wiped out based on the prescribed exclusions. When using the Citrix Profile Management policy above, I ignore all of this advice (except to disable Profile Streaming) and user customisations to the App-V application are successfully preserved between sessions.

To be fair to Citrix, they do say that they only support global publishing. The following Microsoft article states:

Further advice from Microsoft is:

Supporting persistence of User Data between sessions is expected, by persisting the following user data. (And the user profile sync must complete before publishing begins - aka Disable Profile Streaming).

Microsoft continues:

This is contrary to Citrix Advice in that Microsoft say to persist AppData\Roaming\Microsoft\Client folders and HKCU\Software\Microsoft\AppV registry.

The more interesting point about the Microsoft advice is to include HKCU\Software\Classes (the usrclass.dat file). They do say to exclude Local Settings, Activatable Classes, and AppX* subkeys. Are they trying to preserve App-V FTAs?

This brings us to Roaming Exclusions.

Steve Thomas explains this best.

HKCU\Software\Classes does not roam with the user profile (unless you include usrclass.dat as part of AppData\Local)

By default, the App-V Client has Software\Classes included as a defaul roamingregistryexclsion.

So taking this advice all together, what the 'best practise' Profile Management configuration that enables User Publishing, and persists user customisations between sessions? Using the starter Citrix Profile Management policy as above.

Exclude:

AppData\Local (Folder) - This excludes AppData\Local\Microsoft\AppV folders, and usrclass.dat. This also minimises the profile size

Include:

AppData Roaming (Folder) - this covers the Microsoft folder inclusions for user customisations roaming

Registry:

Do Nothing - (App-V does not support roaming %AppData%, but not roaming the user’s profile (registry), or vice versa.)

Profile Streaming

Disable - (We can't guarantes that all user integrations are applied before publishing)

Configure

PreserveUserIntegrationsOnLogin = DWORD:00000001

RoamingRegistryExclusions

Default is fine

 

Be aware that iIf AppData\Roaming is part of the roaming user profile then you are now carrying the user's App-V customisations around in AppData\Roaming\Microsoft\AppV folders. A profile (for each app) within a User Profile. Depending on the apps, and the number of apps, this could grow to a significant size.

Consider redirecting AppData\Roaming to further reduce the roaming profile size. This article describes App-V behaviour when %APPDATA% has been redirected.

 

   

 



Cookie Policy: We do NOT use cookies.