When you use single XenApp Services site to manage both XenApp and XenDesktop environments or you’re providing published desktop and applications from your XenApp farm, you’ve probably noticed that your users will get desktop icon in their start menu and\or desktop.

Well, I’ve run into this issue recently during my project and I thought it just doesn’t look really professional and decided to fix this cosmetic glitch.

To my surprise, I’ve found only only few articles and all of them were using Description field to hide the application (CTX123969). But that’s not what I want – I just want to ignore specific type of application and don’t want to explicitly specify which ones are going to be hidden.

As soon as it turned out that it’s rather unique what I’m doing, I’ve decided to abandon my Google search and started looking for Web Interface SDK.

After few minutes, first prototype was done and it works out of the box as expected.

To implement it, just follow the instructions in original KB (CTX123969), but replace the code with following:

<em>java.util.ArrayList filtered = new java.util.ArrayList();</em>
<em> for (int i=0; i&lt;resources.length; i++) {</em>
<em> if (!(resources[i] instanceof com.citrix.wing.webpn.DesktopInfo)) {</em>
<em> filtered.add(resources[i]);</em>
<em> }</em>
<em> }</em>
<em>resources = (ResourceInfo[]) filtered.toArray( new ResourceInfo[0] );</em>

When you create the backup of enumeration.java, be sure to NOT save it in the same directory as original file, otherwise you will get following error message:

Exception information:
Exception type: HttpCompileException
Exception message: c:\inetpub\wwwroot\Citrix\PNAgent\App_Code\PagesJava\com\citrix\wi\pna\Enumeration – Copy.java(20): error VJS1183: Redeclaration of type ‘com.citrix.wi.pna.Enumeration’ declared in another source file

UPDATE: To prevent any confusion – this solution works for desktops from both XenApp and XenDesktop

Of course, provided under the cover of your favorite disclaimer:

“This software application is provided to you “as is” with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.”

Martin Zugec