As you have probably heard, StoreFront Services (a part of CloudGateway) will replace Web Interface. Because StoreFront Services follows a different design approach towards more interoperability through a framework, a more modern and scalable architecture (moving away from J#), state of the art authentication methods, subscription services and many more, some of the grown tricks and tweaks the community has developed over the years no longer work.

Note that this blog has been updated to reflect the changes made to the Receiver for Web with StoreFront Services 1.2.

One of these is hiding applications from the user. With Web Interface, the logic of application enumeration resides in the J# code – both for web and services (pnagent) sites. The high level flow: WI/IIS connects to the XML broker, receives a list of applications in XML format and either creates a webpage out of it (web site) or an XML file (pnagent).

For the web part, this largely remains the same with Storefront Services. PNagent however metamorphosed into a nice (currently green bubbled) butterfly called the Receiver. Receiver connects to Storefront Services through https and uses a proprietary, native protocol to exchange information. The new architecture consists mostly of .NET code which means instead of editable J# files you will now only find .dlls in both the server and the client program directories. So without breaking the SSL encryption and filtering out items you wouldn’t want to be listed, there is currently no conceivable way of hiding apps for the native Receiver.

However, the web site still relies on JavaScript and HTML so there must be a way, right? There is!

Luckily, you still need HTML and JavaScript to create dynamic web site with a like-locally-installed UX. So you can manipulate the JavaScript on the Storefront Services Server to prevent certain applications from being displayed.

To implement, create a backup copy of “C:\wwwroot\Citrix\%Your_Web_Store_Name%\scripts\Default.htm.script.min.js”, re-format it using and edit as follows:

Below line 2136 (“g.tag = a.replace(/\u3000/g, ” “)”), insert:

if (g.encodedName.indexOf(“notepad”) != -1) {
g.showInStore = false

“notepad” is an example and the string should match the name of your application, desktop or content in XenApp/XenDesktop. Careful with long application names. The name will be trimmed to roundabout 175 chars by the JavaScript logic before the above script line is run. That means, the string needs to match the truncated name in that case, not the actual name.

If you want to hide multiple resources, you can just cascade multiple of these “if”-queries or alternatively use “OR” concatenators and check for two strings in one condition (||).

Happy hiding!

Check out part 2/3 about making apps “sticky” in Storefront and part 3/3 on how to automatically launch applications right after login.