Remko Weijnen's Blog (Remko's Blog)

About Terminal Server, Citrix, Delphi and other stuff


8,788 views

Hello, my name is Danila Galimov and i will write here sometimes :-)

My first post is about communications between Terminal Server sessions and Terminal Server service process (termsrv.exe/dll). Terminal Server service needs to communicate with each session for many tasks, such as sending window message, getting message reply and so on. So, on init, Terminal Server creates a SmSsWinStationApiPort port in global namespace and runs a few WinStationLpcThread threads, which are listening on port and are used to process port messages. When csrss.exe is started, it parses its command line, which usually looks like:

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=4096,4096,1024 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

and loads the required dlls (winsrv.dll in our case). Initialization of winsrv.dll creates a thread, which connects to SmSsWinStationApiPort port and does the loop for processing Terminal Server messages until it receives WinStationTerminate message.

We’ll try to fool Terminal Server Read the rest of this entry »

8,199 views

On a Citrix environment 2 different applications were required. One of the applications required java version 1.5 (and didn’t work with 1.6) and the other application needed specifically version 1.6.

Because the applications are installed on a Citrix server the users do not have write permissions to HKEY_LOCAL_MACHINE so that was another complication.

After a lot of monitoring with process monitor the general process of how a particular Java version loads in Internet Explorer became clear to me.

Java adds an addon to IE called ssv.dll, you can see this trough Tools | Manage Add-ons | Enable or Disable Add-ons:

AddOns

Read the rest of this entry »

  • 1 Comment
  • Filed under: Java, Uncategorized
  • 4,966 views

    I usually have lots of Terminal Server sessions open when I’m working, both direct sessions but also “sessions in sessions”. In order to keep overview on my desktop I prefer to make the session size as big as possible without being full screen (so keep my local taskbar visible).

    LocalTaskBar2

    If I run a session in a session I do this again, this makes switching sessions very easy and you can always see which session you are in:

    Read the rest of this entry »

    992 views

    So I will be attending the Tech-Ed EMEA in Barcelona, maybe some of you are going too?

    It would be nice to meet some of my readers, so maybe I’ll see you there!
    Join Me at Tech·Ed EMEA Connect for IT Professionals!

  • 0 Comments
  • Filed under: General
  • 7,568 views

    I had an application that crashed when opening the Help Topics entry from the Help menu. A trace with Process Monitor showed that it was opening a help (.chm) file. Using Explorer I could normally open the Helpfile so thas was strange. Process Monitor did not reveil any ACCESS_DENIED or other problems.

    I did notice that ieframe.dll was being accessed several times and some further debugging revealed that a dll in the application directory was loaded (psapi.dll). This is strange because psapi.dll resided in the windows\system32 folder normally. Also the copy in the application directory was an old version (4.0.1371.1).

    Read the rest of this entry »

  • 0 Comments
  • Filed under: General
  • 29,871 views

    Well it took some time but I patched Terminal Server for Windows 2008 to allow unlimited sessions in Remote Administration mode.

    This patch is for 32 bit English version. In order to install it you need to perform the steps below. Before you start please check if using this patch is allowed according to your country’s law and your license agreement.

    Read the rest of this entry »

    3,884 views

    EDIT: Please read the Desktop Icons, hide, show, prevent rename or delete article, it may be a better solution!

    One of my customers recently asked if it was possible to preven the user from renaming or deleting the My Documents icon on the desktop.

    If you know that deleting the icon from the desktop doesn’t really delete the My Documents folder from disk but just hides the icon then it’s obvious that it must be some kind of registry setting.

    So I fired up Process Monitor from Sysinternals and deleted the icon. This showed that after deleting the icon changed registry keys at the following location:

    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\

    Read the rest of this entry »

  • 0 Comments
  • Filed under: Uncategorized
  • 970 views

    As a followup to the previous article:

    It might be better to just Exclude taskmanager because settings the Flag value to 0 might disable multi monitor support. To do this Create a new REG_SZ (string) under HKEY_LOCAL_MACHINE\Software\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook and name it Exclude. It’s value should be taskmgr.exe (case sensitive!).

    I’ve also seen some issue where starting a Remote Desktop (RDP) session from within a Citrix session has some troubles with the RDP client’s window (the window “sticks” to the upper left corner or cannot be maximized). So it might be a good idea to include mstsc.exe as well in the Exclusion list (seperate values with ;) .

    The issues seem to have appeared with Hotfix Rollup 2.

  • 0 Comments
  • Filed under: Citrix
  • 26,629 views

    Today I noticed something strange: on a Citrix (Presentation Server 4.5) server taskmanager does not show anything in the applications tab.

    taskmgr

    I tested this on the other Citrix Servers in the farm and they all had the same problem (and non Citrix servers did not). As you might know taskmanager fills the applications tab by enumerating all top level windows. That’s why I suspected Citrix because it places several hooks (multi monitor support, speedscreen etc.).

    Turned out that by setting the Flag value of the HKEY_LOCAL_MACHINE\Software\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook from 4 to 0 fixed the issue.

  • 2 Comments
  • Filed under: Citrix
  • 117,058 views

    As you might know Windows 2003 Server accepts at most 2 concurrent Terminal Server sessions (and 1 console session) in Remote Administration mode (which is the default). Of course if you switch to Application Mode you can have an unlimited number of sessions but this requires licenses and a license server.

    When Terminal Server creates a new session it checks if the new session is either a console session or a help assistant session and if not it allocates a license. The function that performs this check is called CRAPolicy::Logon Read the rest of this entry »

    Profile

    Tags

    Recent Tweets

    Views

    Donate


    Blogroll


    Categories


    Archives