Remko Weijnen's Blog (Remko's Blog)

About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like


32,627 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
  • 198,290 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 »

    2,671 views

    This content is password protected. To view it please enter your password below:

  • Enter your password to view comments.
  • Filed under: Uncategorized
  • 8,645 views

    Most administrator will want to prevent normal users from opening Regedit and a command prompt. Usually this is done by activating the “Prevent access to registry editing tools” and “Prevent access to the command prompt” policy settings. They are located under User Configuration | Administrative Templates | System:

    gpedit

    Activating the policies will set the matching keys in the registry:

    regkey

    If we try to open regedit we are denied access:

    regedit1

    So how does this work? Read the rest of this entry »

    5,693 views

    I was working on an unattended installation of Citrix Presentation Server 4.5 or rather Citrix Xenapp. I was creating the dsn file for the installation by a script that uses the echo command and output this to a file.

    This is a part of the script:

    rem Create ODBC file
    rem ———————————————————————–
    echo [ODBC] > %ODBC%
    echo DRIVER=SQL SERVER >> %ODBC%
    echo UID=%SQL_SA% >> %ODBC%
    echo Address=%SQL_SERVER%,1433 >> %ODBC%
    echo Network=DBMSSOCN >> %ODBC%
    echo LANGUAGE=us_english >> %ODBC%
    echo DATABASE=%CTX_DATASTORENAME% >> %ODBC%
    rem echo WSID=%COMPUTERNAME% >> %ODBC%
    echo APP=Citrix IMA >> %ODBC%
    echo SERVER=%SQL_SERVER% >> %ODBC%
    echo Description=Citrix Datastore >> %ODBC%
    echo. >> %ODBC%

    Even though the generated DSN file looks ok the installation fails. If you look in the installation log you can see this error: Error 26009. Could not Access the datastore using the DSN file.

    I then created a dsn file through the ODBC Data Source Administrator and then the installation went ok. I compared the DSN file with the one my script generated and it was the same.

    A search with Google and in the Citrix forums leads to numerous posts with the same error but none with a real solution. Some suggestions are that you need to remove the WSID line or even the order of the entries in the DSN file. But none of these suggestions work.

    So I compared the two files again and I noticed that the filesize of my generated DSN was slightly bigger. So let’s look again at the script:

    echo DRIVER=SQL SERVER >> %ODBC%

    See the space right before the >>? This means that after each line in the dsn file there’s a space too. If you open the file with a Hex Viewer you can easily see the spaces (ASCII value 20):

    hexdump

    So the solution is to change this (for all lines) to:

    echo DRIVER=SQL SERVER>> %ODBC%

    After that it works perfectly!

  • 4 Comments
  • Filed under: Citrix, script
  • 4,258 views

    If you ever download software from Microsoft’s Volume Licensing Site you have probably seen that it uses the Akamai download manager. Sometimes your downloads get interrupted but how to restart the downloadmanager? There’s no entry in the startmenu and not even an icon on the desktop.

    You can restart the downloadmanager though by creating a shortcut to “C:\Windows\DOWNLO~1\CONFLICT.1\Manager.exe”. Please notice the short directory name (~1).

  • 1 Comment
  • Filed under: General
  • 3,840 views

    Today I was deploying some IBM x3550 and x3650 servers with Altiris Deployment Server. IBM Delivers a toolkit for Altiris that contains amongst others jobs for configuring raid arrays.

    To do this you need to create a raid policy file and deploy this. I created this policy file:

    [Policy.RAID-1]

    AppliesTo.1 = t:ServeRAID-8k-l,d:4

    Array_Mode = CUSTOM
    Array.A = 1,2
    Array.B = 3,4

    Logical_Mode = CUSTOM
    Logical.1 = A:FILL:1
    Logical.2 = B:FILL:1

    As you can see the policy only applies to the type of array controller in my servers (t:ServeRAID-8k-l). This way we prevent applying the policy to other configurarions. I have a 4 disk configuration (d:4) and want to create to RAID 1 arrays (A & B). On each array one Logical drive with the maximum size (FILL parameter).

    Read the rest of this entry »

    25,397 views

    There are several patched terminal server dll’s floating around in the net to allow multiple concurrent Terminal Server session on Windows Vista with Service Pack 1. But they all have the same limitations:

    It’s not possible to start a session to Localhost, this is because the Terminal Server client does a check to see if you are running Personal Terminal Server (Vista/XP) and denies Localhost or 127.0.0.1 if true (127.0.0.2 works though).

    It’s not possible to start multiple sessions with the same user. The patch for Vista RTM did allow for this but in Service Pack 1 some Terminal Server code has moved to the Local Session Manager (lsm.exe) so we need to patch this file as well.

    Offcourse we need to patch Terminal Server to allow unlimited session on Vista as well.

    VPatch files are in the download link below.

    Vista SP1 Patches (6866 downloads)
    10,172 views

    A while ago I included a new undocumented API into my JwaWinsta unit which is called WinStationServerPing. This API “pings” a Terminal or Citrix server and verifies that Terminal Server is up and running. It is not the same as a regular networking ping! This API actually makes a connection to a (remote) Terminal Server and verifies that Terminal Server runs and accepts connections.

    I wrote a small cmdline tool that uses this API to ping a Terminal Server which can be used to quickly determine if a Terminal Server is up and running. I named it WTSPing.

    So how does it work? Open up a command prompt (Start -> Run -> cmd) and type WTSPing /? to see the help:

    Read the rest of this entry »

    13,986 views

    I needed a script to logoff all running Terminal Server sessions in order to rollout an install package. As you might know there is a commandline tool to logoff a session, it’s called logoff.exe.

    These are the commandline options:

    LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]

    sessionname The name of the session.
    sessionid The ID of the session.
    /SERVER:servername Specifies the Terminal server containing the user
    session to log off (default is current).
    /V Displays information about the actions performed.

    No option to logoff all sessions is there?

    On a Terminal Server there is a special session called the Listener session, you can see it with TSAdmin in the sessions tab:Listener

    A Listener is associated with a protocol (Microsoft RDP by default) and is used to setup new sessions. If you logoff a Listener session it will logoff all session that were created through it. Great, just what we need!

    So Logoff 65536 will do the trick? Let’s try:

    logoff

    So Logoff is smart enough to ask for confirmation, we can prevent this by using the following commandline:

    Echo Y ! Logoff 65536

    Donate


    Blogroll


    Categories


    Archives