I am presently debugging a failed application launch of MS Access 2007 under Citrix Application Streaming and it’s “falling back” to server delivered.   Every single one of the other MS Office applications are running without issue.  Something is broken in the launch sequence, and just for MS Access.  How to diagnose?

Some time back I wrote an article about directly using RadeRun to launch applications without publishing.  This is useful, but what about the reverse.  What if “things aren’t right” and you want to know where it came unglued?

First, here’s the graphic of launch components.

Notice that everything goes through RadeRun.exe.  This is the application streaming equivalent to wfcrun32.exe in ICA Client spaces.  In my case, I’m launching MS Access by clicking on the start menu published icon and this means that PNAgent is first in line.

This is an “online” stream to client because I haven’t yet run this application successfully for it to get placed into the “usable offline” category.

Here’s the launch sequence.

  1. User (me) clicks on icon in the start menu and this triggers PNAgent.
  2. Windows launches PNAgent.exe with a bunch of command line parms.
  3. PNAgent (the new instance) observes that it is already running and hands the parameters over to the already running version and then commits suicide.  I’m not actually sure which one terminates.
  4. PNAgent (the main one) contacts Web Interface to get .ICA file.
  5. Web Interface contacts XenApp IMA who provides .ICA file.
  6. PNAgent observes “streamed app” and sends to RadeRun as .RAD file.
  7. RadeRun tosses this over the wall to the streaming service who runs app.
  8. Streaming client tries to run the app, but it doesn’t work.
  9. Streaming client (Raderun) returns “failure” to PNAgent who triggers falback to server delivered.
  10. PNAgent hands .ICA file to wfcrun32 who generates the ICA session.
  11. Joe gets terbed because he didn’t want to launch hosted.

Let’s start with step “2”

Right mouse button on the start menu reveals that clicking this icon does:

  • “C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe” /CitrixShortcut: (2) /QLaunch “XenApp6:Microsoft Access”

Compare this to MS Outlook, which is working

  • “C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe” /CitrixShortcut: (2) /QLaunch “XenApp6:Microsoft Outlook”

The “(2)”s are a bit strange, but nothing looks different between the working and failing case.

Next step: Figure out why streaming system could not launch app (step 8).

Turn on the Application Streaming service’s debug console.

  • HKLM\Software[Wow6432Node]\Citrix\Rade\EnableDebugConsole DWORD 1

Launch failing app again.

Debug console says:

THAT’S all?  There should be lots of stuff here.  Close the annoying hosted session.

Compare to working application: MS Word in this case.

Okay, for starters, Sandbox Reuse kicked in here to skip the majority of the launch activity.  BUT, we still got what we need.  Notice that the working application and the failing application were from different profiles.

Working:  Office2007SP2 and and

Failing: Office2007CacheFinal

Check all the rest of the applications and every one except Access is “correct”.

Feels like this problem is solved

Contact your administrator and tell them to fix the publishing of MS Access and all will be happy.  Did this: Admin responds, Access is published correctly and even sends you a screen shot to prove it.

Maybe so, but the streaming client is still launching the “wrong” profile.  Why?

Time to get deeper into the launch sequence

The stuff to launch is given to the streaming client in .RAD file, which is really a .ICA file with streaming stuff in it.  I’d like to see that .RAD file.

There’s a challenge here.  One of the parameters in the .RAD file  tells the streaming client to erase the RAD file immediately after it is done reading it.  This is done for house cleaning to keep .RAD files from littering up the temp space on the user’s profile.

This means that by the time the streamed app launch occurs and fails, “you missed it”.   The RAD file is already gone.  We need to get in “early”, at step “7”.

Faking out RadeRun

Since RadeRun is the key to streamed application launch, I originally tried replacing RadeRun.exe with notepad.exe.  I hoped this would have enough garbage on the command line that notepad would get mad and tell me about the offending command line.  It didn’t work.  All I got was notepad complaining that it couldn’t find the file.  Try and try, I couldn’t find a worker app to do what was needed.

I want the RadeRun command line and I want the .RAD file.  How to get?

Wrote a program

Wrote a short program called, MsgBox, which displays command line parameters using Win32 MessageBoxEx API, waits for user to click okay, and then terminates.

PERFECT.  Just what the Doctor ordered.

  • BTW – Source code for MsgBox is included in the download link above.

Here’s the installation procedure…

Now, launch the offending application.

Cool.  I now know what the command line parameters were and I now know where the .RAD file was placed and I now know that the .RAD file wasn’t erased!

Go find ’em RAD FILE.  Ctrl-C on the message box to put the text into clipboard and then adjust a bit to get to the right place.  CD to the right directory and then edit the file using your favorite text editor.

Be aware: the file is marked “HIDDEN” and this means it won’t show up in normal directory search.  BUT, you can edit it and you can also un-hidden it.

In this file you will find lots of stuff at the top which is a normal .ICA file used for fallback to server mode.  At the bottom is the important stuff, starts with “[RADE]”.

Lookie there! “Cache”.   This means that somewhere along the line, I’m still getting published the Cache version of Microsoft Access.  Everything else is “6.0” level.  Memory is fading on buzzwords, but I’m pretty sure Cache was 5.2, so I’m a couple releases back on this application and this means that something is broken “up stream”.

Armed with this new information, I’m off to the admins office to find out more about the publishing.  I believe I’m published “twice”.

Joe Nord