1. HP BiDi Channel Components Installer error

    There has been an issue with the HP bi-directional (BiDi) component for some years where the MSI installer tries to run each time a user logs in resulting in events in the application event log such as:
    Product: 64 Bit HP BiDi Channel Installer — The installer has encountered an unexpected error installing this package

    This issue is described in this HP Support document– I took “Workaround #2” from this article and created this batch file which is run at computer startup via Group Policy:

    :: HP BIDI Fix for x64 bit Windows
    set HPBIDI=%windir%\system32\spool\drivers\x64\3\HPZBDI64.msi

    :: Check if the HP BIDI MSI file is already 0 bytes
    CALL :CheckZeroSize “%HPBIDI%”
    :: Delete the .old file if it exists
    del /f /q “%windir%\system32\spool\drivers\x64\3\HPZBDI64.old.msi”>NUL
    :: Rename the HP BIDI MSI
    ren “%HPBIDI%” HPZBDI64.old.msi>NUL
    :: Create a new 0 byte dummy HP BIDI MSI file
    copy /y NUL “%HPBIDI%”>NUL
    goto :eof

    if %~z1==0 exit 0
    goto :eof

  2. Faulting application name: svchost.exe, Faulting module name: scardhook64.dll

    We were seeing these errors on a XenApp 6 farm:

    Faulting application name: svchost.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc3c1
    Faulting module name: scardhook64.dll, version:, time stamp: 0x4b8ca08e
    Exception code: 0xc0000005

    The work-around was to disable the Citrix Smart Card hook, of course this can only be done if smart cards are not used in the environment. We used GPP to set these registry entries:
    HKLM\Software\Citrix\CtxHook\AppInit_Dlls\Smart Card Hook\Flag = 0
    HKLM\Software\Wow6432Node\Citrix\CtxHook\AppInit_Dlls\Smart Card Hook\Flag = 0
    Note that the default values for these registry settings is 0x80000000.
  3. Easily find installed hotfixes with PowerShell

    I {heart} PowerShell.

    Need to find out if a particular hotfix is installed? Just run this command, substituting the KBxxxxx number for the hotfix you want to search for:
    get-hotfix | select HotfixID | where {$_.HotfixID -eq “KB2444558“}

    27/05 UPDATE: Wow, talk about doing things the hard way! The concise code is this:
    get-hotfix -id KB2444558

    Notice that the hotfix is NOT within quotes.

  4. Windows 2008 R2 scripting: lessions learnt

    My scripting plans were foiled twice this week on Windows 2008 R2.
    I have implemented a VBScript XenApp reboot script for several years now on several XenApp farms. I decided to convert to a Powershell script for a client’s XenApp 6 farm but ran into problem one: a scheduled task which runs when the user is not logged in cannot send interactive messages. Put another way, my reboot script cannot send a message using the MSG command to users on the server informing them that the server will reboot, and rebooting a XenApp server without notifying the users is not a good thing! I went back to the drawing board and used the XenApp 6 policy reboot functionality based on worker groups and a startup script which adds XenApp servers to a “Reboot Odd” or “Reboot Even” worker group based on the last digit of the computer name (the script also moves the server into the correct XenApp Servers folder, assigns the correct load evaluator and moves the server to the correct XenApp zone).
    Problem two: For reasons I now cannot remember I needed a script which was running in the local SYSTEM context to spawn a process running as a domain user. Easy, PSEXEC to the rescue….. hmmm, no, it seems PSEXEC uses a call which cannot be used running as SYSTEM. There are possibly other utilities I could have tried, but I worked around this issue by creating a scheduled task using SCHTASKS which runs under a domain account and is set to run once at 23:59. I start the task using SCHTASKS /Run /I /TN “TaskName”, wait for a few seconds and disable the task using SCHTASKS /change /TN “TaskName” /DISABLE. The benefit to this method is that the task can be enabled and run manually from the Task Schedular console.
    Happy scripting!

  5. Disabling/hiding Windows 7 or Windows 2008 R2 libraries

    I was looking for this info a few weeks ago while locking down a XenApp 6 published desktop, but couldn’t find it then. To hide a Library: simply hide the associated file .library-ms file like so:
    cd %appdata%\Microsoft\Windows\Libraries

    attrib +h Pictures.library-ms

    The alternate method is to remove the libraries functionality completely with the following registry hack:

    EDIT:You do not have to remove HKLM\SOFTWARE\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}
    Windows Registry Editor Version 5.00
  6. XenApp 6 command line configuration

    My previous blog entry covered installing XenApp 6 from the command line. Installing XenApp 6 from the command line does not join your server to the XenApp farm, to do that you must run the command line configuration utility XenAppConfigConsole.exe (found here: C:\Program Files (x86)\Citrix\XenApp\ServerConfig\XenAppConfigConsole.exe). Firstly review the Citrix documentation as there are a number of configuration options.

    Here is a command line to create a XenApp farm:

    XenAppConfigConsole.exe /ExecutionMode:Create/FarmName:XA6 /CitrixAdministratorAccount:domain\user /DsnFile:C:\Build\mf20.dsn /AuthenticationType:Windows /OdbcUserName:domain\user /OdbcPassword:password1 /LogFilename:C:\Build\Logs\XA6_Config.log

    Here is another example command line to join a server to an existing farm:

    XenAppConfigConsole.exe /ExecutionMode:Join /DsnFile:C:\Build\mf20.dsn /AuthenticationType:Windows /OdbcUserName:domain\user /OdbcPassword:password1 /LogFilename:C:\Build\Logs\XA6_Config.log

    ExecuteMode: the main options are self explainitory, Create or Join (note there are also Leave and ImagePrep options as well)
    FarmName: is only required when used with /ExecutionMode:Create and is the name of the farm to be created.
    CitrixAdministratorAccount: is only required when used with /ExecutionMode:Create and is the domain account to be added as the first XenApp farm administrator.
    DsnFile: is the path to a DSN file configured for your SQL data store database. Copy MF20.dsn from an existing server in your farm, or use this as a basis and change the DATABASE ad SERVER entries:

    DRIVER=SQL Server
    APP=Citrix IMA
    AuthenticationType: this is the SQL DB authentication type for the data store DB which is either Windows or SQL.
    OdbcUserName: The SQL data store DB username, either a Windows logon or SQL logon based on the AuthenticationType option above.
    OdbcPassword: The SQL data store DB password, either a Windows or SQL account password based on the AuthenticationType option above.
    Some optional parameters worth mentioning are AddUsersGroupToRemoteDesktopUserGroup and AddAuthenticatedUsersToRemoteDesktopUserGroup which add the local users to the local Remote Desktop Users group and add the Authenticated Users group to the local Remote Desktop Users group respectively. Set these to true to enable them: /AddUsersGroupToRemoteDesktopUserGroup:true

    If you use an XML port other than port 80 you will also need to set /CustomXmlServicePort:port_number

    Note that the above command lines are based on a SQL data store.

    My Powershell based XenApp 6 installation script is working nicely now. A base Windows 2008 R2 install can silently have all XenApp 6 prerequisites installed, XenApp 6 installed and configured, and applications installed. I will try to cover the silent installation of the prerequisites in a later post.

  7. XenApp 6 command line installation

    I’m just starting my first XenApp 6 install and I like what I see so far. This is the first major change to XenApp in several releases. If you were familiar with Presentation Server 3.0 you would have had no problem jumping into a Presentation Server 4.0/4.5 even a XenApp 5.0 farm. But with XenApp 6 there are enough changes to make a seasoned pro get googling quickly!

    If you are into command line silent installs like I am then you will find the installation method has significantly changed – a role-based installation method is now used. The installation of XenApp 6 has been separated from the configuration of XenApp – note that “configuration” includes joining the server to the farm.

    To install XenApp 6 from the command line use XenAppSetupConsole.exe which is found in the “XenApp Server Setup\bin” folder of the XenApp 6 source. A typical installation command line is:

    XenAppSetupConsole.exe /install:XenApp /Enterprise /logfile:C:\Build\Logs\XA6_Install.log

    You can likely guess what this does: installs Enterprise edition of XenApp and logs the installation to a log file.
    Make sure you set the correct edition (/Advanced, /Enterprise or /Platinum) for your licenses and the /logfile switch is optional.
    The /install switch has a number of options which allows installation of other components such as Web Interface, Secure Gateway, Provisioning Server and Provisioning Services Target Device. To install an all-in-one demo box, your installation command might look like this:

    XenAppSetupConsole.exe /install:XenApp,WebInterface,Secure Gateway /Enterprise

    To install XenApp with support for Provisioning Services:

    XenAppSetupConsole.exe /install:XenApp,PVDeviceFeature /Enterprise

    The command line installation of XenApp 6 is well documented on Citrix eDocs. I will cover the command line configuration of XenApp 6 next time.

  8. XenServer VM poor network performance

    In a recent project we were seeing very slow printing on the new Windows 2003 print server VMs created on XenServer. Some print jobs were taking 20 minutes to print where they should only have been taking 20 seconds. It was easy to see that the print job spooled quickly to the print server, but from the print server to the printer the job went at a snail’s pace.
    I can’t take responsibility for finding this fix (thanks Reece!):

    DisableTaskOffload = 1 (DWORD)

    After some testing I created a group policy which applied this fix to all XenServer VMs in the domain (using WMI filtering).

    We were using XenServer 5.5 so I don’t know if the same issue applies on XenServer 5.6 with the latest Xen Tools.

  9. How to disable the "Print Dialog" window with XenApp plugin for Mac

    I have a client using some Apple Macs to connect to a Citrix XenApp farm. All was working except an annoying “print dialog” pop-up window whenever a print job was sent. This Citrix article states “This feature may be enabled or disabled under the File menu of the Citrix ICA Client”.
    But our client is using the XenApp plugin, not the full XenApp client and this article is not relevent for the plugin, only the full client.

    What I was after was a way to disable this feature in the Mac plugin and this is the solution, with much thanks to Citrix Support:

    Using Terminal, type the following command (PSShowPrintDialog must be typed exactly as shown):


    When the Client is launched it reads the setting, so restart the Client if it is already running for it to see the change.

    My goal is always to remove any manual steps so I asked Citrix if this setting could be automated, and one option (which I have yet to test) is to create a simple Apple Script as follows:
    do shell script “defaults write com.citrix.icaclient PSShowPrintDialog NO”

    This can be made using Script Editor which can be found in Applications -> AppleScript (just copy and paste the command above). The script can be saved as an application for anyone to use (and could be set to run at start-up using System Preferences if required, or linked on the Web Interface site).

Subscribe to our Newsletter

Please leave this field empty.