Note that once the Desktop Viewer is enabled the display settings from the farm and Web Interface are ignored – the idea being that Desktop Viewer gives the user control of how to size and place their desktop session. Enabling the Desktop Viewer on a desktop appliance site where a published desktop automatically opens full screen will break this functionality; the desktop session will open in a window instead.
Delivered
Problems, fixes & fustrations of all things relating to application delivery, virtualisation and automation. Lots of Citrix, VMware, scripting..... and whatever else grabs me.
9 November 2011
Enable the Citrix Desktop Viewer with XenApp
Note that once the Desktop Viewer is enabled the display settings from the farm and Web Interface are ignored – the idea being that Desktop Viewer gives the user control of how to size and place their desktop session. Enabling the Desktop Viewer on a desktop appliance site where a published desktop automatically opens full screen will break this functionality; the desktop session will open in a window instead.
24 October 2011
How to determine the client IP address in XenApp 6
HKLM\SOFTWARE\Citrix\Ica\Session\2\Connection\ClientAddress
Now I just had to find a way to determine the Session ID, which was easier than I thought:
HKCU\Volatile Environment\2
And now to put it together into a script:
Set objShell = CreateObject("Wscript.Shell")
aRegKeys = RegEnum(".", "HKCU", "Volatile Environment")
sessionID = aRegKeys(0)
strIPCTXClient = objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\Ica\Session\" & sessionID & "\Connection\ClientAddress")
WScript.Echo "Client IP Address: " & strIPCTXClient
'************************************************************************
'*
'* Function RegEnum()
'*
'* Purpose: Enumerate all subkeys of the specified registry key.
'*
'* Input: strHkey - registry hive (HKLM, HKCU etc)
'* strKey - the registry key to enumerate
'*
'* Output: An array of the subkeys. An empty array is returned for an error.
'*
'************************************************************************
Function RegEnum(strTarget, strHkey, strKey)
Const VBObjectError = -2147221504
Const FUNCTIONNAME = "RegEnum ()"
Dim intHkey
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_CURRENT_CONFIG = &H80000005
Select Case UCase(strHkey)
Case "HKCR"
intHkey = HKEY_CLASSES_ROOT
Case "HKCU"
intHkey = HKEY_CURRENT_USER
Case "HKLM"
intHkey = HKEY_LOCAL_MACHINE
Case "HKU"
intHkey = HKEY_USERS
Case "HKCC"
intHkey = HKEY_CURRENT_CONFIG
Case Else
Err.Raise vbObjectError, FUNCTIONNAME, "Invalid HKEY: " & strHkey
RegEnum = Array()
Exit Function
End Select
On Error Resume Next
Dim objReg
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strTarget & "\root\default:StdRegProv")
If Err <> 0 Then
RegEnum = Array()
Exit Function
End If
' Get all subkeys in the specified key
Dim arrSubKeys
objReg.EnumKey intHkey, strKey, arrSubKeys
If Err <> 0 Then
RegEnum = Array()
Exit Function
End If
If IsArray(arrSubKeys) Then
RegEnum = arrSubKeys
Else
RegEnum = Array()
End If
End Function
11 August 2011
Citrix acquires RingCube
11 July 2011
Stress testing print drivers on XenApp
Use the Citrix StressPrinters utility to test print drivers before they are introduced into the XenApp farm. A test XenApp server must be used during stress testing to ensure the new print driver is not introduced into the production farm prior to successful testing.
- Install the print driver onto the test XenApp server
- A Printer Port must be created for use during the test. Open Print Management, expand the local Print Server right click Ports and select Add Port.
- Choose Local Port, click New Port and enter the port name as “test”
- There is a graphical interface for StressPrinters, but I prefer the command line interface. The following is an example showing a test of the HP Color LaserJect 2600n driver:


addprinter64.exe -name "StressTest" -driver "HP Color LaserJet 2600n" -conc 5 -iter 10 -delay 500 -port "test"
To test a different print driver simply replace the text "HP Color LaserJet 2600n" with the exact print driver name as displayed within Print Management.
The symptoms of a failed stress test are one or more of the following:
- The stress test hangs
- The Print Spooler crashes
- Interactive Services Detection pop-ups
Note that a successful test may still show warning as shown below:

If a print driver fails the stress test go back to the vendor's web site and hunt around for an alternative driver and try again. While this process does take some time to complete, the resulting stable XenApp farm is worth the effort.
22 June 2011
Recommended XenApp 6 Hotfixes
XA600W2K8R2X64010- There is an issue with this hotfix which affect UPD printers - see this Citrix forum post for the fix - replaced by XA600W2K8R2X64079- XA600W2K8R2X64012
- XAE600W2K8R2X64018
- XA600W2K8R2X64021
- XA600W2K8R2X64029
XA600W2K8R2X64040replaced by XA600W2K8R2X64077- XA600W2K8R2X64062
XA600W2K8R2X64057replaced by XA600W2K8R2X64079- XA600W2K8R2X64058
- XA600W2K8R2X64063
- XA600W2K8R2X64068
- XA600W2K8R2X64077
- XA600W2K8R2X64079
- XA600W2K8R2X64089
1 June 2011
Citrix Provisioning Services 5.6 Best Practice
31 May 2011
Faulting module: svchost.exe_gpsvc
The Group Policy Client service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 120000 milliseconds: Restart the service.
And this error in the application log:
Faulting application name: svchost.exe_gpsvc, version: 6.1.7600.16385, time stamp: 0x4a5bc3c1
Faulting module name: ntdll.dll, version: 6.1.7600.16695, time stamp: 0x4cc7b325
Exception code: 0xc0000374
Faulting application path: C:\Windows\system32\svchost.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

