Remko Weijnen's Blog (Remko's Blog)

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

Archive for the ‘Citrix’ Category

Windows Vista introduced the Command Bar in Explorer which is sometimes also referred to as the Folder Band or the Task Band. The Command Bar is of course also present in Windows 7 and Server 2008 (R2).


This Command Bar shows possible tasks or actions depending on the active folder. I wanted to remove the “Uninstall or change a program” (in Dutch this is called “Een programma verwijderen of wijzigen”) button from the Computer view:



I noticed that XenApp 5 Feature Pack comes with a new version of the Web Interface (5.2) (it is also available as standalone download). The parameters to install it in silent mode have changed but there’s no documentation at all on the Citrix Site:



  • Filed under: Altiris, Citrix
  • I needed to add a printer connection to a Citrix server but the problem was that this printer had a buggy driver. I wanted to use an alternative driver such as the Citrx Universal Printer driver but on Terminal Server you might want to use the Terminal Services Easy Print driver.

    So I decided to make something that could be used in both situations, the result is a small commandline tool called AddPrinter2 (sorry I am not good in finding original names).

    It takes 2 parameters: the printername as unc path and the driver name. An example would be:

    AddPrinter2 “\\server\printer” “Citrix Universal Printer”.


    A few days ago I noticed that an unattended installation of Citrix XenApp 5 was installing very slowly. When I looked at the various jobs and their installation time in the (Altiris) Deployment Server I saw that it was the Citrix Access Management Console that took almost 45 minutes to install:


    It was clear that this wasn’t normal since the install job is taking installing OS components like IIS and all subcomponents, activating Application Server and reboot in around 9 minutes. The installation of Citrix XenApp itsself takes only 14 minutes.

    I searched with Google and one of the first links was this knowledge base article from Citrix: Slow Access Management Console Installation on XenApp 5.0. The article clearly describes that the delay is occurred by failing checks for Publisher’s and Server Certificate Revocation (because there’s no Internet Connection) and suggests to turn these checks off. Indeed my servers do not have a direct internet connection so the cause and solution were clear.

    And actually I had seen similar issues before in other (non Citrix) installations, some examples are Exchange 2007 (here and here) and SQL Server 2008 (the SQL Installer actually checks if there’s an internet connection in the prerequisites check).

    The suggested, manual way, of turning of these checks is to clear the following checkboxes in Internet Explorer’s advanced settings Dialog:


    But since I had to do this on many servers I decided it would be better to do it with a little VBS script.


    I was deploying an unattended installation of Citrix XenApp 5.0 with Altiris Deployment Server. The installation consists of several prerequisites, the installation of XenApp and finally the Citrix Management Consoles.

    The installation is performed with a special account and not the Local System account because the install packages are located on the network.

    When testing the deployment on a Windows Server 2008 I noticed that sometimes MSI based installations would fail with error code 1603 or 1601.


    Delegated Management Console

    In this topic I just want to show(case) you something I created in the past. It is a management console that enables delegated management in a Terminal Server or Citrix environment.

    The console is launched by a small executable that check credentials (based on group membership) and then launches an RDP session with the actual console in it. The logic behind it is that the RDP session runs with an account with delegated permissions in Active Directory and the actual user account that logs in here doesn’t have any permissions at all.

    This is the login screen:


    If you’ve passed the login screen you enter the Main Console which consists of a Treeview on the left with possible options and a work area on the right:



    Citrix Desktop Switcher

    A while ago I wrote a small tool to assist in switching between a Full Screen Citrix Desktop and the local desktop. By default the Citrix client can switch from full screen to windowed mode (with the SHIFT F2 hotkey) but it doesn’t minimize the window automatically. So this always requires manually minimizing, do your local work, give focus to the Citrix client again and press the hotkey again to return to full screen.

    My idea was really simply: we write a little exe that runs locally and registers the SHIFT F2 hotkey. When the Hotkey is pressed we determine if we are in full screen or in windowed mode and reverse that. When going from Full Screen to Windowed we minimize the Citrix Client and notify the user (by balloon tip) that he is on the local desktop. I called it the Citrix Desktop Switcher (sorry I couldn’t come up with a more original name)

    So let’s see it in action!

    When you start the Citrix Desktop Switcher you are notified that the tool is running (it doesn’t matter when you start the Switcher, you can start if even if the Citrix Session is already running).



  • Filed under: Citrix
  • Modifying Microsoft Updates and/or hotfixes

    As you might know Microsoft distributes updates and hotfixes with in installer, update.exe. When you run update.exe it looks into the supplied .inf files to see what it has to install. It’s not possible to make changes to the inf files however because that will invalidate it’s signature (and update.exe checks the signature that is stored in an accompanying .cat file).

    In my case I wanted to deploy the MUI pack for Internet Explorer 7 to be able to support multiple languages. By default this pack installs 35 (!) languages and I wanted to install only Dutch language on top of existing English.


    A few days ago I was troubleshooting some strange problems on a Citrix Server. After some investigation (I will write about that later) it was clear to me that there was a shortage of System Page Table Entries (PTE’s). Using perfmon you can see how many free System PTE’s are available:


    Any value below 5000 is not good, values below 2000 are critical. In my case it wasn’t possible to view processes with Task Manager anymore.

    Next I used WinDbg and attached to the Kernel (you can do that with File | Kernel Debug | Local | OK) and issued the !vm command:


    WinDbg shows us a warning that a lot of PTE allocations have failed, we can also see that there’s enough Paged Pool and Non Paged Pool available.

    So how do we find the guilty driver (usually it’s a driver)? (more…)

    Existing code to simulate the Secure Attention Sequence (SAS),which most people refer to as control alt delete or ctrl-alt-del, no longer works in Windows Vista. It seems that Microsoft offers a library that exports a function called SimulateSAS(). It is not public and one is supposed to request it by sending a mail to Mails to this address remain unanswered though.

    I researched how other people (including Microsoft) have solved this task and was unhappy with the results: some solutions work only with (or without) UAC, most solutions work only for the current or console Terminal Server sessions or need a kernel mode driver.

    So I decided to create my own Saslib with the following goals:

    • Should work both with and without User Account Control (UAC)
    • Should support current, console and any Terminal Server session
    • Does not need a driver
    • The calling application does not need to be signed or have a special manifest
    • Support multiple programming languages

    I have succeeded and thus SasLibEx was born: not only can it successfully simulate the SAS sequence it can do this for any/all Terminal Server sessions. It can also lock the workstation (again for all sessions) and switch between the normal desktop and the secure desktop (the desktop that UAC runs on). SasLibEx was successfully tested both with and without User Account Control (UAC).

    In the future I will place SasLibEx on it’s own website. Meanwhile you can contact me if you are interested in it at the following mail address: mail

    Please note that I have spend lots of time into this project and therefore I cannot give it away for free

    Update: I have added new features to SasLibEx, see here: