• Category Archives Windows 2008 R2
  • Wfica32 Application State “Application not running” workaround

    Recently I ran into an issue with double hop ICA session from a XenApp server. For those not aware of this, this is a situation where you launch xenapp from a local farm and connect to another farm through that XenApp session, hence Double Hop.

    The issue is that with changes in Windows 2008 architecture, when processes are changed. In the Citrix Management Console this represents itself as Application Status “Application not running” and no Application name listed. This will prevent XenApp application limits from taking hold.

    This issue is very similar to the Citrix KB article here documenting a resolution on how to use VBscript to launch Internet Explorer. I tried that resolution and in my case it did not fix the issue. I was launching wfica32.exe to launch a remote session using an ICA file. Even when launching wfica32.exe as a published application with no script, I saw the above symptoms.
    I found that if I put a pause and hid the script with ctxhide.exe as long as the script was running it would show the Application name and the correct Application State but this caused a different issue, user would close the double hop ICA application and the script would stay resident keeping the session open until it idled out and giving the user the idle timeout warning well after the user closed the actual session. This simply will not work so back to the drawing board.

    This message also cannot be turned off as documented here.

    So my resolution was to come up with a way to detect if the process was running or not running and logoff the session based upon that. I tried several methods but wanted to keep it simple (KISS principle) so I stuck with the batch file that I was already using to launch the file anyway and added error detection into that script using tasklist to detect if the process was running.
    It is published with the following app settings in Xenapp
    ctxhide.exe C:adminapplaunch.cmd ICAfile.ica
    The Script
    REM —Copy all of this text into a notepad and save it as a batch file

    REM —to see if a program is running
    @echo off

    sleep 1
    REM – This will launch the ICA file. Publish the App in XenApp and call the paramater for the ICA file in c:Admin

    “C:Program Files (x86)CitrixICA Clientwfica32.exe” c:admin%1

    sleep 30

    :loop
    set runningprocess=wfica32.exe
    rem —- 1: all one line —-
    tasklist /FI “IMAGENAME eq %runningprocess%” /FI “Username eq %username%” | find /I “%runningprocess%” > nul
    rem —- 1: end of line
    IF %ERRORLEVEL% equ 0 echo %errorlevel%
    IF %ERRORLEVEL% equ 1 logoff
    sleep 300
    goto loop

     This script should be pretty easy to edit. Tasklist does not provide errorlevel so I used find to find the process and create the errorlevel. The script will stay resident until the wfica32.exe process is closed and within five minutes of ending the remote ICA session under that user context it will then do a logoff for that user. 


  • Citrix Provisioning Services 6.1 Blue Screen

    Following on the footsteps of older bugs coming back to bite us. I have found an issue with Citrix Provisioning Services 6.1 Update 19 on Windows 2008 R2 (this does not affect Windows 2008 x86).

    Issue: Citrix Provisioning Server 6.x displays Blue Screen of Death (BSoD) when starting target Virtual Machine from the vDisk.  When starting the target Virtual Machine from the vDisk, this BSoD (0x0000007b) is displayed, while the master Virtual Machine did not have any problems.

      
    The machine was created with the correct steps. I went through the standard PVS troubleshooting steps to resolve this issue. 
    The machine was cloned off the master template used to create the image
    VMware ethernet IDs matched on the clones setup using the Streamed VM Setup Wizard in PVS
    Image was built with the VMXNET3 Adapter
    You can find most of those troubleshooting steps in this Citrix article
    If you have worked with Citrix Provisioning Services for some time you have more than likely encountered this error before.. 
    I first dismissed this article from Citrix that explicitly mentions the following and it applies to older versions of the products and mentions that this issue is resolved.

    Note: Do NOT install the Device Identity Manager software if you are running Provisioning Services 6.0 software or later. The latest version of Device Identity Manager was included in the 6.0 target device software going forward. Installing Device Identity Manager atop any 6.0 or later target device software breaks the network interface and prevents XenConvert from running. 

    But this article was exactly what the doctor ordered, Eureka!!, I was almost ready to rebuild the image from scratch as everything else worked correctly. 

    Resolution: Apply Microsoft KB article 2550979 Updated 10/10/2013  New link to support 2008 R2 SP1 and RTM patch

    I recommend going through the other steps for troubleshooting first but I hope this helps you resolve this issue in the future.