http://www.archy.net

Comments: (0)

Remote Desktop published application – Double upper case issue

Category : Citrix, EdgeSight, Microsoft, Presentation Server 4.5, Web Interface 5, WebInterface, Windows 2003, Windows 2008, XenApp, XenApp 5

At one of my customer place, we need to publish mstsc.exe (RDP Client) through XenApp 4.5 on Windows 2008 x64. Users complained about a weird keyboard behaviour. While typing in their session, users stated using shift for the first letter, the second letter was upper case as well. I’va made a quick video to show you this issue, you can watch it bellow :

 

On the Citrix Web Interface, one ICA file is used as a template for ICA file creation, default.ica. I edited this file to check what was in :

[WFClient]
COMAllowed=Off
CPMAllowed=On
ClientName=
KeyboardTimer=50
MouseTimer=10
OutBufCountClient=118
OutBufCountHost=118
OutBufLength=512
PersistentCacheEnabled=On
ProxyFavorIEConnectionSetting=Yes
ProxyTimeout=30000
ProxyUseFQDN=Off
RemoveICAFile=yes
TransparentKeyPassthrough=Local
TransportReconnectEnabled=On
UpdatesAllowed=Off
VSLAllowed=On
Version=2
VirtualCOMPortEmulation=Off

In the WFClient (section bellow) I found the line KeyboardTimer=50 which mean at the end of the specified time period the keyboard data are sent to the server. I didn’t wanted to modify this value without beeing able to test it before, so I right clicked on the published Remote Desktop icon to download the launch.ica file (generated with the defgault.ica and the 50ms value) saved it and the edited it changing the keyboardTimer value to 25 then 15 then 10 and finnaly 5. I had the issue until the last value 5ms tested.

Now I need to make some more test to check if the bandwith consumed is really highter compare with the 50ms default value. I will update this post with the statistics result (Edgesight)

Update : 1st July 2010

I’ve used Citrix Edgesight to check what’s going on while I run some test toward ICA Session Traffic and ICA Session I/O. To run this test I created a script which open notepad and type a text (about 30/40 lines) so the same text input will be use for all the tested values.

I made this test with KeyboardTimer=50 (default), KeyboardTimer=25 and KeyboardTimer=5 and here are the results :

 

I did blank the “non needed” data to avoid confusion and as you might notice, there is not a huge difference between these different values. I decided to commit the change for wan users and I will check in deeper statistics will real usage on weeks/month, before/after the change.

I wanted to blog this issue because this is an annoying one and you might search a long time around the mstsc configuration, registry tips and tunning before finding out this was the KeyboardTimer value in the default.ica file on the Citrix WebInterface. You can also add the line KeyboardTimer=## (your value) to your WFCLIENT.INI file in your user profile directory, it should make the trick if you don’t want to commit this change for everyone using the WebInterface.

Sources : http://support.citrix.com/article/CTX103444


Join the forum discussion on this post

Comments: (5)

EventLog parser (WMI) and export to Excel vbscript

Category : Citrix, Microsoft, Windows 2003, XenApp

Today my need was very simple, I needed to build a script to collect logs in application event log on many XenApp servers. The goal with the following script it to use MFCom to get the target XenApp server list and export everything from the last 7 days and a specific keyword to an Excel file. This is very far to be perfect but it works and it did the job I needed :)

Let’s share !

Set objFSO = CreateObject("Scripting.FileSystemObject")
 
'Path and name of the Excel file
FileExport = "d:\temp\yourfile.xls"
'Name of your management Server (Must have MFCOM SDK if not a XenApp Server
CtxFarms = Array("XenappManagementserver.domain.inc")
'Folder in the XenApp Management Console, must begin with Servers/ ex : Servers/APPLICATION1
TargetPool = "Servers/ApplicatioForlder"
 
If (objFSO.FileExists(FileExport)) Then
	objFSO.DeleteFile(FileExport)
End If
 
Const CONVERT_TO_LOCAL_TIME = False
Set dtmStartDate = CreateObject("WbemScripting.SWbemDateTime")
Set dtmEndDate = CreateObject("WbemScripting.SWbemDateTime")
DateToCheck = CDate(Date)
'Number of day back to check here 7
dtmStartDate.SetVarDate DateToCheck - 7, CONVERT_TO_LOCAL_TIME
dtmEndDate.SetVarDate DateToCheck, CONVERT_TO_LOCAL_TIME
 
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add
Set objRange = objExcel.Range("A1","Z1")
objRange.Font.Size = 12
objRange.Font.Bold = True  
 
objExcel.Cells(1, 1).Value = "Server"
objExcel.Cells(1, 2).Value = "Event Source"
objExcel.Cells(1, 3).Value = "Event Type"
objExcel.Cells(1, 4).Value = "Event ID"
objExcel.Cells(1, 5).Value = "Event Message"
objExcel.Cells(1, 6).Value = "Event Date"
 
lign = 2
 
For i = 0 To UBound(CtxFarms)
	Set theFarm = CreateObject("MetaFrameCOM.MetaFrameFarm", "\\" & CtxFarms(i))
	theFarm.Initialize 1
 
	For Each aServer In theFarm.Servers
		If aServer.ParentFolderDN = TargetPool Then
			objExcel.Cells(lign, 1).Value = aServer.ServerName
			TargetSource = "Application"
			Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & aServer.ServerName & "\root\cimv2")
 
'This line is to query the Security event log
'			Set colLoggedEvents = objWMIService.ExecQuery("Select * from Win32_NTLogEvent Where Logfile = 'Security' and SourceName = '" & TargetSource & "' and Type = 'Error' and TimeGenerated >= '" & dtmStartDate & "' and TimeGenerated < '" & dtmEndDate & "'")	

'This line is to query the System event log
'			Set colLoggedEvents = objWMIService.ExecQuery("Select * from Win32_NTLogEvent Where Logfile = 'System' and SourceName = '" & TargetSource & "' and Type = 'Error' and TimeGenerated >= '" & dtmStartDate & "' and TimeGenerated < '" & dtmEndDate & "'")	

'This line is to query the Application event log
			Set colLoggedEvents = objWMIService.ExecQuery("Select * from Win32_NTLogEvent Where Logfile = 'Application' and SourceName = '" & TargetSource & "' and Type = 'Error' and TimeGenerated >= '" & dtmStartDate & "' and TimeGenerated < '" & dtmEndDate & "'")
						For Each objEvent in colLoggedEvents
'                                   Change here to find event using a keyword in the main message
				MyPos = Instr(1, ucase(objEvent.Message), UCase("KeyWord"))
				If MyPos > 0 Then
					objExcel.Cells(lign, 1).Value = aServer.ServerName
					objExcel.Cells(lign, 2).Value = objEvent.SourceName
					objExcel.Cells(lign, 3).Value = objEvent.Type
					objExcel.Cells(lign, 4).Value = objEvent.EventCode
					objExcel.Cells(lign, 5).Value = objEvent.Message
					objExcel.Cells(lign, 6).Value = WMIDateStringToDate(objEvent.TimeGenerated)
					lign = lign + 1
				End If
			Next
		End If
	Next
Next
 
objExcel.ActiveWorkbook.SaveAs FileExport
objExcel.Quit
 
EnvoiMail()
 
Wscript.Quit
 
Function WMIDateStringToDate(dtmInstallDate)
    WMIDateStringToDate = CDate(Mid(dtmInstallDate, 5, 2) & "/" & Mid(dtmInstallDate, 7, 2) & "/" & Left(dtmInstallDate, 4) _
            & " " & Mid (dtmInstallDate, 9, 2) & ":" & Mid(dtmInstallDate, 11, 2) & ":" & Mid(dtmInstallDate, 13, 2))
End Function
 
Function EnvoiMail()
	Const SendUsingPort = 2
 
	' Set the variables used to send the message
	SMTPServer = "smtp.server.com"
	FromName = "administrator@admin.com"
	ToName = "me@admin.com" 
 
	' Setup the configuration for the message to use
	Set Conf = CreateObject("CDO.Configuration")
	With Conf.Fields
	    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = SendUsingPort
	    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer
	    .Update
	End With
 
	'Setup the message
	Set Message = CreateObject("CDO.Message")
	With Message
	Set .Configuration = Conf
 
    'Set email adress, subject And body
    	.To = ToName
    	.Subject = "Email Subject"
    	.TextBody = "Hello World !"
    	.From = FromName
    	.AddAttachment FileExport
    	.Send
	End With
 
End Function

At the end I added a function to send this Excel file by email so I can schedule this check and genrerate this report.


Join the forum discussion on this post

Comments: (2)

Citrix XenApp – Hiding system drives part 2/2

Category : Citrix, Microsoft, Presentation Server 4, Presentation Server 4.5, Windows 2003, Windows 2008, Windows 2008 R2, XenApp 5, XenApp 6

This is the second part, here is the link to the first part : Citrix XenApp – Hiding system drives part 1/2

If you read the first part, now you know how to apply the Microsoft Windows 2003/2008/R2 GPO to hide A,B,C or/and D drives. But what’s happening if you have a E: drive or O: ? You cannot use this GPO anymore, you need to create your own. This is simple to understand how it works, just read what’s follow.

By default the Hide Drives part in the system.adm file look like this :

POLICY !!NoDrives
   EXPLAIN !!NoDrives_Help
      PART !!NoDrivesDropdown          DROPDOWNLIST NOSORT REQUIRED
         VALUENAME "NoDrives"
          ITEMLIST
                NAME !!ABOnly           VALUE NUMERIC 3
                NAME !!COnly            VALUE NUMERIC 4
                NAME !!DOnly            VALUE NUMERIC 8
                NAME !!ABConly          VALUE NUMERIC 7
                NAME !!ABCDOnly         VALUE NUMERIC 15
                NAME !!ALLDrives        VALUE NUMERIC 67108863
                ;low 26 bits on (1 bit per drive)
                NAME !!RestNoDrives     VALUE NUMERIC 0 (Default)
          END ITEMLIST
     END PART
   END POLICY
 
[strings]
ABCDOnly="Restrict A, B, C and D drives only"
ABConly="Restrict A, B and C drives only"
ABOnly="Restrict A and B drives only"
ALLDrives="Restrict all drives"
COnly="Restrict C drive only"
DOnly="Restrict D drive only"
RestNoDrives="Do not restrict drives"

Comments: (5)

Citrix XenApp – Hiding system drives part 1/2

Category : Citrix, Presentation Server 4, Presentation Server 4.5, Windows 2003, Windows 2008, Windows 2008 R2, XenApp 5, XenApp 6

Hiding system drives C, D, floppy if there is still one and CDRom seems to be easy but I saw many many time at some customer’s place administrator unable to complete this simple operation. The reason is in most of the case, the administrator doesn’t really know how to manage GPO and what is difference between user and machine GPOs.

First you need to know there is a built-in GPO in Microsoft Windows 2003 / 2008 / R2 with these settings ready to be set.

To set it up, you need to create a new GPO or edit an existing one and find these two GPO bellow as follow :


Join the forum discussion on this post

Comments: (3)

Citrix Edgesight 5.2 SP1 : Could not create the Java Virtual Machine.

Category : Citrix, EdgeSight, Microsoft, Presentation Server 4, Windows 2003, Windows 2008

This issue appear on my Presentation Server 4 HR5, 32bit only, x64 servers (Windows 2003 & 2008) were fine after deploying Citrix Edgesight Agent for XenApp 5.2 SP1. (build 5.2.3012.0)

Impacted applications :

All java applications using more than 706mb of reserved memory, command line example :

 c:\Progra~1\Java\jre1.5.0_07\bin\javaw -Xms8m -Xmx1024m -Dcai.starter.jvm.options=”-Xms8m -Xmx1024m” -classpath d:\xxxxxxxxxxxxx

Visual Studio 2008 Pro SP1 x64 crashes when Citrix Edgesight 5.2SP1 is installed, process CL.exe.

Reminder :

-Xmsn
Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB.      

-Xmxn
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. 

Affected system : Microsoft Windows 2003 R2 Sp2 x32 with Citrix Presentation Server 4 HR5


Join the forum discussion on this post

Comments: (0)

XenApp 4.5 / 5 unattended installation

Category : Citrix, Microsoft, Presentation Server 4.5, Windows 2003, Windows 2008, XenApp 5

Unattended installation is very usefull in large XenApp farm, of course if you’re deploying one server per two month you might not be interessed by this process automation but this is always interresting to know this kind of tips. Scripts bellow are example I use every day in production to install servers, of course its needs to be change and adapt to your own settings and of course if you have some ideas to share, I take it !

This unattended example assume you have only one network card enable, a local XenApp source installation file and IP address type 192.168.3 / 192.168.10 / 192.168.200 / 10.113 / 10.112. This file allow to join an existing farm named CTX_TEST with a datastore hosted on a SQL server. Finally, you need to create one folder per farm inside your XenApp source folder if you are automating multi farm setup.


Join the forum discussion on this post

Comments: (3)

How to debug Java website publish application

Category : Presentation Server 4, Presentation Server 4.5, Windows 2003, Windows 2008, Windows 2008 R2, Windows 7, Windows XP, XenApp 5, XenApp 6

These last days I had to find out what was wrong with an extranet publish through XenApp. This extranet is using java and the issue users reported was random disconnection with a java popup. Find out what is wrong with extranet application is very hard because this is just a published browser with an URL pointing to a website in another company, everything works well until one day… My goal was to bring as much information and details as possible to the extranet’s support team and I needed to use the java console and grab the most verbose log possible.

First you need to publish the Java Control Panel,


Join the forum discussion on this post

Comment: (1)

Citrix XenApp / ICA / Online Plug-in Client version numbers.

Category : Citrix, Microsoft, Presentation Server 4, Presentation Server 4.5, Provisioning Server 5, Receiver, Windows 2003, Windows 2008, Windows 7, Windows Mobile 6.5, Windows XP, XenApp 5, XenApp Plugin

This information can be very useful, because as you might know, there are build numbers and version numbers, and it become a mess very fast when you try to list all ICA client version connecting your Citrix Presentation / XenApp servers.

4.00.581
4.00.686
4.20.715
4.20.727
4.20.741
4.21.779
6.00.910
6.01.963
6.01.964
6.01.967
6.20.985


Join the forum discussion on this post

Comments: (0)

Citrix Edgesight XenApp Agent 5.x doesn’t start

Category : Citrix, Edgesight 5, Microsoft, Windows 2003, XenApp 5

I have a new issue… I am updating all Edgesight XenApp agents to 5.2 and I have problem on only some servers. These servers have remapped drivers ( m: & n: ) and run Windows 2003 R2 Sp2. The installation is successful without any error but after a reboot the service doesn’t want to start with the message : “The Citrix System Monitoring Agent service on Local Computer started and the stopped…”

snap00067

In Event Logs

Type: Error
Event Source: Citrix System Monitoring Agent
Event Category: None
Event ID: 34
Date: 16/10/2009
Time: 09:49:32
User: AUTORITE NT\SYSTEM
Computer: EMCXPA000
Description:
The Citrix System Monitoring Agent was unable to startup. Please consult the Sys_event_txt.txt agent log in your data directory for details.

Click on read more to continue

Comments: (0)

How to completely disable DEP in Windows Server 2003

Category : Microsoft, Windows 2003

To completely disable DEP in Windows Server 2003, perform the following with administrative credentials:

1. Open Windows Explorer

2. Tools > Folder Options > View

3. Uncheck Hide Protected operating system files (Recommended) and Hide extensions for known file types

4. Click apply > OK

5. Browse to C:\

6. Right click on boot.ini, select properties and ensure the “read-only” tab is unchecked and click OK

7. Edit boot.ini

8. Modify the  /noexecute=

For example, set  /noexecute=AlwaysOff to disasble DEP entirely

9. File > Save, close boot.ini file

10. Right click on boot.ini, select properties and ensure the “read-only” tab is checked and click OK

11. Reboot the computer