In App-V 4.6 we used to use the command line Sfttray /exe to open a process inside the virtual environment of an App-V Package, a lot of people referred to this as “breaking into the bubble”. As you would of heard, our trusty sfttray commands have been replaced in v5 by all new PowerShell cmdlets.
So how can we open up a new process inside the virtual environment of an App-V package in 5.0?
This cmdlet can be used to launch whatever process we desire inside the bubble of any App-V 5.0 package published on the client.
First thing we need to do is get the name of the package we are interested in:
From the output we can choose the package we want, this is case I’m going to use WinRar. So I am going to store this in a variable called $appvpackage by running the following command:
$appvpackagename = Get-AppvClientPackage WinRAR
Now we ready to run our Start-AppvVirtualProcess command:
Start-AppvVirtualProcess -FilePath C:\Windows\System32\cmd.exe -AppvClientObject $appvpackage
Start-AppvVirtualProcess -FilePath C:\Windows\System32\cmd.exe
-FilePath specifies the location of the process I want to launch inside the virtual environment, in this case I am launched command prompt and for me this is the ideal process because from the command prompt we can launch additional processes which will also be inside the bubble.
-AppvClientObject is the package which we want to launch inside and in this case we are just passing the variable we created earlier against it.
We now have a command prompt launched inside the virtual environment.
From here we can now browse and interact with the virtual environment. For example if I launch a regedit from this command line and then a regedit from the local machine, I can compare the differences:
Here we can see the WinRAR key with the regedit that has been launched inside the bubble (Right) and compare it to the local registry (Left) where the key does not exist! Click here for more information on the virtual registry mechanisms!
Go on you legend ! :)
Thanks, very helpful
Thanks for the information, yay
What are the pros and cons (if any) of using this method as opposed to using /appvve or /appvpid switches?
Not much difference Anil, check out this post for a full explanation: blogs.technet.com/.../app-v-5-0-launching-native-local-processes-within-the-virtual-environment.aspx
I'm exploring the possibilities of 'breaking' into the virtual environment in App-V 5.
It seems the one thing I'm looking for does not exist...
I would like to be able to 'insert' a running process into a virtual environment.
Do you know if such a thing is even possible with App-V 5?
Your right all methods spawn a new process inside the VE. There is no way that I know of that will allow you to inject a process that is already running, there would some challenges around shifting the namespace visibility for a process that has already been launched.
I am interested in what you are trying to achieve and why the ability to insert a running process as you described would be useful?
Thanks for you reply.
What I'm trying to achieve:
I built this "launcher" which is capable of handling several application virtualization types in a uniform way (App-V 4.x, Symantec SWV, VMware ThinApp and now App-V 5). After using a special shortcut or file type association the launcher will import/load/stream the application after which it can be customized/personalized INSIDE the VE.
As App-V 5 seems more similar to Symantec SWV than to App-V 4.6, I wondered if it might have the same functionality (like injecting a process into a VE, for which SWV has an API). In my case it would just improve performance, that's all.
Having said that, I have just found out from a colleague that the problem is with the Parent directory choice during sequencing. If you use c:\program files as parent directory instead of choing the actual installation directory c:\program files\Adobe, then there is a chance that you do see the application folders within the bubble. Good to know anyway although I won't sequence in this manner anyway
Whoops it seems my first post didn't get published. ok the post above is to follow on the fact that on x64 bit Windows I can never see the program directories within the bubbles say under c:\program files, and this using any methods /appvid or powershell etc.. and then a colleague told me about the above. I think the problem is only with x64 bit.
Are you sure they aren't just there under the Program Files x86 location?
I see it properly in Local Registry under Appv\Client\Packages dont see it when virtual registry is launched. I tried different options like /appvve & /appvpid as well but same resutls. Any ideans on where I might be doing wrong
Do you see the virtual system okay?