$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
4 Feb // php the_time('Y') ?>
In my project the monitoring group required that SNMP was installed and configured on all servers.
I wrote scripts for Windows 2003 and Windows 2008 that I deploy from my Altiris Server.
This is the script for Windows 2003:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | @echo off rem Install SNMP rem Create Sysoc Answer File echo [NetOptionalComponents] >InstallSNMP.txt echo SNMP = 1 >>InstallSNMP.txt echo. >>InstallSNMP.txt echo [SNMP] >>InstallSNMP.txt echo Accept_CommunityName = MYCOMMUNITY:Read_Only >>InstallSNMP.txt echo Any_Host = No >>InstallSNMP.txt echo Community_Name = "MYCOMMUNITY" >>InstallSNMP.txt echo Contact_Name = "MYCONTANT" >>InstallSNMP.txt echo Limit_Host = MYIP >>InstallSNMP.txt echo Location = "MYLOCATION" >>InstallSNMP.txt echo Send_Authentication = Yes >>InstallSNMP.txt echo Service = Applications, Internet, End-to-End, Physical, Datalink >>InstallSNMP.txt echo Traps = THETRAPIP >>InstallSNMP.txt Sysocmgr.exe /i:\windows\inf\sysoc.inf /u:\Windows\Temp\InstallSNMP.txt /r |
29 Jan // php the_time('Y') ?>
If you want to obtain a user’s token in a Terminal Server or Citrix session (eg to launch a process in a session) you can call the WTSQueryUserToken function.
On the x64 versions of Windows XP and Server 2003 this function fails however and returns ERROR_INSUFFICIENT_BUFFER (“The data area passed to a system call is too small.”) when called from a 32 bit process.
Internally WTSQueryUserToken calls the undocumented function WinstationQueryInformationW with the WinStationUserToken class (14) and passing a WINSTATIONUSERTOKEN struct, filled with caller ProcessId and ThreadId.
But on x64 Windows the size of this structure is 24 bytes, while on 32 bit Windows the size of the structure is 12 bytes!
28 Jan // php the_time('Y') ?>
On a Citrix XenApp 5 environment a user reported that he was unable to start a Full Screen session on a Dual Monitor Configuration.
He received this error message:
Citrix has a KB Article: “How to Allow More Memory for Session Graphics on Windows Server 2003” that explains exactly how we can solve this.
We need to change the MaxLVBMem registry value and we can use the Excel Sheet from the KB Article to calculate the proper value.
Please don’t set this value too high because a higher value means you will restrict other kernel memory pools.
You also need to deny the SYSTEM account the SetValue permission on the HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management key to prevent the Citrix IMA service from overwriting the new value.
So I wrote a small PowerShell script to change the permission and set the value:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | $keyName = "SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\icawd\thin16" $valueName = "MaxLVBMem" # Calculate your value! http://support.citrix.com/article/CTX114497 [int]$value = 0xc00000 # Set Identity to SYSTEM via it's Well Known SID [System.Security.Principal.SecurityIdentifier]$ident = "S-1-5-18" # Open Registry Key (with Write Permissions) $regKey = Get-Item "HKLM:" $regKey = $regKey.OpenSubKey($keyName, $true) # Fetch Existing permissions $acl = $regKey.GetAccessControl() # Construct a new Ace $rights = [Enum]::Parse([Security.AccessControl.RegistryRights], "SetValue") $deny = [Enum]::Parse([Security.AccessControl.AccessControlType], "Deny") $rule = New-Object Security.AccessControl.RegistryAccessRule($ident, $rights, $deny) # Add the new Ace to the Acl $acl.AddAccessRule($rule) # Apply the new Acl to the Registry key: $regKey.SetAccessControl($acl) # Now set the required Value $regKey.SetValue($valueName, $value) # Close the key $regKey.Close() |
20 Jan // php the_time('Y') ?>
As you may know, you can enumerate processes of a specific Terminal Server or Citrix session using the NtQuerySystemInformation function.
On x86 system the code below works fine:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | var Status : NTSTATUS; RetLength : DWORD; SessionInfo : SYSTEM_SESSION_PROCESS_INFORMATION; CurrentProcess : PSystemProcesses; begin SessionInfo.SessionId := SessionId; SessionInfo.Buffer := nil; SessionInfo.SizeOfBuf := 0; Status := NtQuerySystemInformation(SystemSessionProcessesInformation, @SessionInfo, SizeOf(SessionInfo), @RetLength); while (Status = STATUS_INFO_LENGTH_MISMATCH) do begin SessionInfo.SizeOfBuf := RetLength; SessionInfo.Buffer := GetMemory(RetLength); try Status := NtQuerySystemInformation(SystemSessionProcessesInformation, @SessionInfo, SizeOf(SessionInfo), @RetLength); if NT_SUCCESS(Status) then begin CurrentProcess := SessionInfo.Buffer; while True do begin // Your code here if (CurrentProcess^.NextEntryDelta = 0) then Break; Cardinal(CurrentProcess) := Cardinal(CurrentProcess) + CurrentProcess^.NextEntryDelta; end; Exit; end; finally FreeMemory(SessionInfo.Buffer); end; end; SetLastError(RtlNtStatusToDosError(Status)); RaiseLastOSError; end; |
While this works fine on Windows XP and 2003 x86, it fails to work correctly on the x64 versions of Windows XP and 2003 (or maybe even higher).
The problem is that RetLength is always SizeOf(SYSTEM_SESSION_PROCESS_INFORMATION) and thus we are in an endless loop!
17 Jan // php the_time('Y') ?>
I got some interesting questions from a user today regarding TIFF images on a Windows 2003 based Citrix environment.
This user has an application that works with scanned documents and for each document exists both a pdf and a tiff version in the application.
By default the TIF (and TIFF) file extensions are linked to the Windows Picture and Fax Viewer in Windows 2003.
The user told me that some time ago she had an extra toolbar where she could perform some extra operations such as making a selection on TIFF images.
At some point in time this mysterious Toolbar disappeared and she was never able to get it back. She reported this to the helpdesk and the system administrator but they were unable to resolve this.
I hadn’t hear of this toolbar before but a Google Search led me to this page which explains the toolbar in question which is called the Annotation Toolbar.
7 Jan // php the_time('Y') ?>
I often hear that people configure the Paging File (on Citrix or Terminal Servers) on a seperate volume but, the reasons is either performance or the chance that the Paging File might corrupt the volume.
However if at some point you would like to create a Memory Dump you must have a paging file on the boot volume.
For a Small memory dump you need at least 2MB Paging File on the Boot Volume but for a Full Memory Dump you need a Paging File that is sufficient to hold all the physical RAM plus 1 megabyte (MB).
Side Note: with the increasing ram of today’s servers, how long does it take for a full memory dump to be saved when you have lots of gigabytes?
4 Jan // php the_time('Y') ?>
If you are implementing a Citrix, Terminal Server or even just a plain Client-Server environment you will need to create a Default User Profile at some point.
The Default User Profile can be thought of as the initial registry settings that are used when a new profile is created.
Many people think that the Default User Profile is available in regedit via HKEY_USERS\.Default but this is NOT the Default User Profile.
27 Dec // php the_time('Y') ?>
Today I shadowed a user’s session in Citrix and when I wanted to type something I noticed that the keyboard layout was incorrect.
This is and old “friend” that I always tend to forget about. So hopefully this post will help me to remember it :D.
You can prevent this by adding a value “IgnoreRemoteKeyboardLayout” to the registry key HKLM\System\CurrentControlSet\Keyboard Layout:
reg add “HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout” /v IgnoreRemoteKeyboardLayout /t REG_DWORD /d 0x00000001 /f
This option has been present since Windows 2000 but was broken in Windows 2003. For Windows 2003 there are two related hotfixes, see kb 842136 and kb 917910.
19 Dec // php the_time('Y') ?>
As you probably know there are several different Folder Views in Windows Explorer:
The Explorer keeps tracks of the last used View per Folder in the registry in the key HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags. This KB article sort of desribes this functionality.
11 Nov // php the_time('Y') ?>
Today I was tested my unattended Citrix installation (XenApp 5 on Windows 2003) and I noticed that the install was taking longer than expected.
This was because of a popup:
I am not sure if this popup is shown because I ran MsiExec with /Qb- (I usually do that when testing) but if the Popup is not shown it means that at least the installation of this driver (probably Citrix Universal Print driver) fails.
So this means I needed to script turning off Driver Signature Warnings. A quick search led me to kb article kb298503 which is titled “Driver signing registry values cannot be modified directly in Windows“. As you may guess that title drew my attention. (more…)