Kirx' Blog - kirxblog.wordpress.com

How to launch an external Program inside an App-V 5 Environment | July 3, 2012


Do you want to launch ‘cmd.exe’ within an App-V 5 (Beta) Virtual Environment? ‘OSD Scripting’ can’t help you here… OSDs are gone. Read about a quite neat method that was discussed during the German User Group – and that was streamlined by Volker Kleiner (@vkleinerde)…

Dedication and Disclaimer

The information in this blog were put together by Volker Kleiner, who offered me to publish that here. This tweak was introduced by Sebastian Gernert during the German App-V User Group meeting in June this year.

As for now, this is NOT a supported method by Microsoft and it might happen that this tweak disappears in the final version of App-V 5. We’re talking Beta here.

The Challenge

Beginning with App-V 4.5, there was that “/exe” command line parameter of SFTTRAY that allowed users to launch ‘any’ application in the context of a virtual application – without OSD modifications or ‘tricks’ like File->Open dialogs. In App-V 5, there aren’t any OSD files any longer (and the Beta’s configuration.xml have still some limitations on scripts) and there is no launcher (like sfttray) either… so how to get into an virtual environment to validate the files and registry settings that are present in the virtual application?

The Solution

With the Beta of App-V 5, Microsoft introduced a command line switch “/appvve” that apparently can be added to “any” executable to launch it inside a VE. It seems that the App-V Client 5 installation mystically adds this switch to applications – and believe it or not, I have absolutely no clue how they do that!

The command line for it is

executable.exe /appvve:PackageGUID_Version_GUID

So, to launch a CMD in a given virtual environment, launch

cmd.exe /appvve:3b58d5f6-72ee-417c-9813-5d296b4f131f_d04e507d-7c5b-4396-9e0c-a7685fa99484

An Improvement

Because that is not exactly handy (just close your eyes and repeat the two GUIDs), Volker created a small PowerShell script that simply takes the “friendly” App-V 5 Package Name as an input parameter. No rocket science here, but way easier than the pair of GUIDs:

$APP = $args[0]
$pkg = get-appvclientpackage –name $APP
$AppvPackageId = [string]::join("", $pkg.PackageID)
$AppvVersionId = [string]::join("", $pkg.VersionID)
$AppvGUIDs=$AppvPackageId +"_" + $AppvVersionId
Cmd.exe /appvve:$AppvGUIDs

A Final Mystery

Now you may ask why the heck Volker Kleiner didn’t publish this on his own site at www.app-v.info? Well, he is about to reorganize that page (worth observing it… did you notice his “Error Code” section?) and so Volker decided not to publish new things there in between. You should follow @vkleinerde, not only learn about his site’s progress Smile

Other Resources

After goog.. searching, I found another article by Sander Zegveld that I read before… but I didn’t notice then that here an Internet Explorer has been started using the same method. And yes, if you like App-V Sander (@funnyproffy) is one of the “to follow” guys as well.

Advertisements

Posted in App-V, Client, Tools
Tags: , , ,

3 Comments »

  1. […] We know that it is possible to launch a external (non virtualized) executable inside a App-V 5 virtual environment by using the /appvve parameter and supplying the PackageID and VersionID of the sequence that you want to launch the executable into. See this blog article for more information: https://kirxblog.wordpress.com/2012/07/03/how-to-launch-an-external-program-inside-an-app-v-5-environ… […]

    Pingback by Launching an external exe into a Connection Group using /appvve | Welcome to Packnowledge — April 16, 2013 @ 09:20

  2. $AppVName = Get-AppvClientPackage
    Start-AppvVirtualProcess -AppvClientObject $AppVName cmd.exe

    http://support.microsoft.com/kb/2848278

    Comment by outofstep00 — June 4, 2013 @ 06:23


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: