How to enable Windows 7 Theme in Citrix XenApp 6

This article will give you an overview of how to enable the Windows 7 desktop experience on a XenApp 6 Server.

The default desktop delivered by a XenApp 6 server (or Windows 2008 R2 server) is a desktop intended primarily for an administrator to manage a server. As many of you probably have been doing for the last decade or so if you have used a published desktop with Citrix XenApp(MetaFrame or Presentation Server). The look and feel of such a desktop is different in many ways from how a Windows Desktop OS looks and feels, it has no support for themes and a number of accessory applications like the Windows Media Player, Snipping tool and other tools are not available.

Here is a quick guide on how to enable a Windows 7-like experience, Microsoft documentation states that you need to add the Desktop Experience feature to the machine that you are going to deploy this on (or image, provisioning services vhd image etc).
This can be done easily by using the built in Server Manager in Microsoft Windows Server 2008 R2 or you can add the lines below to your machine preparation script or OS config.

import-module ServerManager
Add-> WindowsFeature Desktop -> Experience

The Windows Desktop experience feature adds support for themes and it also installs the accessory apps that I mentioned above. Once this feature is installed and you reboot the server, you need to start the Themes service (and ensure that its startup type is configured as Automatic). To do this, you can copy the lines below to a script/workflow step that gets invoked after the machine is rebooted during the worker machine (or image) preparation process.

Set-Service -Name Themes -StartupType Automatic
Start-Service Themes

If you were working on an image, you can now create virtual worker machines from this image. Citrix recommends placing all the worker machines that are reserved for a specific tenant in an Active Directory OU created for that tenant.

You should also create a GPO that will set a specific theme and wallpaper for all users (assuming for now that all of the tenant's users get the same theme and wallpaper and are not allowed to change this). The PowerShell code for this is shown below. This code creates a domain GPO that sets the theme to the Win7 Basic theme and allows you to specify a path to a wallpaper file that is present on the local server.

import-module grouppolicy
#Create a new domain GPO
$gpo = new-gpo -name <Name of the GPO>
#Set the policy for Themes
$gpo | Set-GPRegistryValue -Key "HKCU\Software\Policies\Microsoft\Windows\Personalization"
-Type String -ValueName ThemeFile -Value "%windir%\resources\Ease of Access Themes\basic.theme"
#Set the policy for wallpaper
$gpo | Set-GPRegistryValue -Key "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System"
-Type String -ValueName WallPaper -Value <path to a local wallpaper file>

Once the GPO is created you can link it with the OU that contains the users.

Now, when a user logs in to a hosted desktop, the desktop looks like the picture below. See the difference?

Note: The wallpaper policy might not take effect. However, Microsoft has already released a hotfix for this issue - KB 977944, which you need to install on the worker machine.

Some source materials

Awards

Citrix Technology Professional bio for Alexander Ervik Johnsen

image

Connect on Twitter

Want to make sure you don't miss out on any upcoming news and videos?
Join our *NEW* mailing list by signing up with the Virtualization Community

Follow @ervik

Become a partner

Find us around the web

image image image