by: Helge, published: Oct 16, 2007, updated: Oct 26, 2010, in

Undocumented Program Neighborhood Command Line Switches

Nearly every professional working with Citrix Presentation Server knows about Program Neighborhood (PN), and some may even use it frequently. It was first introduced in MetaFrame 1.8 and is used to start published applications from one or more server farms. In PN you can either configure individual applications or define application groups. The latter are simply lists of published applications which PN pulls from a designated Presentation Server and displays in its UI.

That is about as far as my knowledge went until not too long ago. Then I came across a question in the German Citrix Users Group’s forum asking about PN’s command line parameters. Since I knew next to nothing about those I started investigating and came up with interesting results.

Documented Command Line Switches

I first searched through various Admin Guides but to my surprise I could find no information at all on command line parameters. Googling did not help much, either. Then I tried starting pn.exe with the switch /? and got a dialog box that lists the following switches which I call documented because I was able to find at least some reference on them:

Suppress loading of Windows TAPI support

The client is not started in callback mode [whatever that means]

/APPname of custom connection
Start a custom ICA connection defined in PN without displaying PN’s GUI

/PNname of an application group/APPname of a published application
Start a published application from an application group without displaying PN’s GUI

/PNname of an application group
Open a specific application group in PN

/PNname of an application group/FOLDERpath to folder
Open a folder inside an application group in PN

Pass parameters to a published application

Undocumented Command Line Switches #1: /PNI

That was quite nice, but the question in the forum asked about the switch /PNI. By googling for that I came across a post from Jeff Pitsch which, albeit being very short, pointed me in the right direction. Whenever you drag an application’s icon from PN to the desktop a shortcut to the application gets created. Such a shortcut contains a command line similar to the following:

"C:\Program Files\Citrix\ICA Client\pn.exe" /APP "Published App" /PNI "u0a3b6h3"

Obviously the parameter /APP is being followed by the name of a published application. But what is the cryptic string after /PNI supposed to mean? After some digging around in PN’s configuration files the answer was clear: Every application group created in PN gets an internal ID. These IDs are defined in section [Program Neighborhood] of the file %APPDATA%\ICAClient\PN.INI.

Now, why not simply use /PNname of program group” instead of using that cryptic ID? I suppose it is because PN allows you to rename application groups after they have been created. Since PN cannot know in which places shortcuts to its applications might be stored it cannot update them and the shortcuts would point to groups that would not exist under the name stored in the shortcut any more. Thus the ID.

Searching for More

The fact that the switch /PNI is not documented or mentioned anywhere got me interested. I used Sysinternals “strings” tool, which extracts all printable strings from arbitrary executables or DLLs, on pn.exe version 10.1. I got a fairly long list which I searched for the switches I already knew of. Interestingly enough, there were more.

Undocumented Command Line Switches #2: /CONTENT

After some thinking what this might be about it suddenly hit me: /CONTENT can be used in conjunction with /PN to open published content from an application group.


/PNname of an application group/CONTENTname of published content

Undocumented Command Line Switches #3: /TESTDRIVE

This can or was probably used to connect via modem to the Citrix TestDrive service. If pn.exe is started with only this parameter it displays the following dialog box:

Nowadays using the web site is surely easier (and cheaper).

Just for completeness sake: the following strings in pnUI.dll correspond to this function:

Your modem is not properly configured. In order to use this program over a dialup connection, you must rerun Test Drive Setup after your modem is configured.

There are no modems installed on your system. If you wish to use Test Drive with a modem, please use the Control Panel to install one and run Test Drive Setup again.

Undocumented Command Line Switches #4: /NOUPDATE

This is only guesswork: can this be used to disable auto client update?

Another interesting find

When looking through the list of strings contained in pn.exe I came across this very interesting specimen:

You FOOL!!! Now you’ve done it!!!

I wonder what one has to do to get that message from PN.

Previous Article Taming Black Holes: Parallel Session Creation
Next Article Dirquota - Automagically Manage File System Quotas