There are instances in which you will need to troubleshoot applications running in the App-V bubble (or the virtualised environment). Although applications delivered by App-V are running locally, they are separated from other applications and the operating system by the App-V client (the feature known as the SystemGuard, although usually referred to as the bubble).
This poses some challenges – how do you use troubleshooting tools such as Process Monitor if it can’t see the application? To do this you will need to launch a Command Prompt into the bubble.
The Old Way – editing OSD files
The old method of launching an external application into the bubble was to edit an OSD file and add SCRIPT entry. In this example, CMD.EXE will be launched before the application (TIMING=”PRE”) and inside the bubble (PROTECT=”TRUE”).
<SCRIPT EVENT="LAUNCH" TIMING="PRE" PROTECT="TRUE" WAIT="TRUE" TIMEOUT=""> <HREF>cmd.exe</HREF> </SCRIPT>
On starting the application shortcut, Command Prompt will open – once you exit Command Prompt the application will then start.
As you can probably see, there’s an issue with this – you need to edit the OSD files. That’s not something you want to do in a production environment.
A Better Way – Use SFTTRAY instead
App-V 4.5 introduced the /LAUNCH switch to the SFTTRAY.EXE command. This allows you to specify an alternate executable name as the primary application when launching an App-V package. To use this you first need to find the application name and version from your App-V package (although you may already know this from the application shortcut properties). To view the application names run:
SFTMIME QUERY OBJ:APP /SHORT
This will return the list of applications for the current user context (or all of the applications if you run the command as an administrator). Don’t forget the /SHORT switch otherwise you’ll get a lot more information that you need. Use SFTTRAY /? to see the complete list of switches.
To launch an alternate executable, copy the application name as listed and use the SFTTRAY command like this:
SFTTRAY /EXE cmd.exe /LAUNCH "WinMerge 00000010"
This will launch the App-V package with Command Prompt as the primary executable instead of the executable listed in the OSD file. After you exit Command Prompt the application won’t then be launched as would happen with the OSD method. Additionally, you can do this in production without affecting applications for other users.
A couple of the 3rd party tools such as the App-V Client Diagnostic and Configuration tool (ACDC) 1.1 from Login Consultants or SoftBar by Greg Brownstein provide a simpler way to get an application into the bubble via a GUI.
ACDC is my preferred troubleshooting tool, which gives you a plethora of options for managing applications with the ability to launch a tool in the bubble of a specific application:
And here’s SoftBar in action, which can do the same type of thing:
Both tools allow you to extend the launch menu with additional executables.