Nov 21, 2012 - 18 Comments - Virtual Vibes -

Breaking into the virtual environment in App-V 5.0

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?

Start-AppvVirtualProcess

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:

Get-AppvClientPackage

get-appvclientpackage

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:

Now we are ready to run our Start-AppvVirtualProcess command:

-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.

start-appvvirtualprocess

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:

regedits

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!

18 Responses to Breaking into the virtual environment in App-V 5.0

  1. Paul

    Go on you legend ! 🙂

    8 Apr 2014 - Reply
  2. Darshan

    Great Work….!

    8 Apr 2014 - Reply
    • Thamim Karim

      Thanks!

      8 Apr 2014 - Reply
  3. Sguilly

    Thanks, very helpful

    8 Apr 2014 - Reply
  4. Adam

    Thanks for the information, yay

    8 Apr 2014 - Reply
  5. Anil

    What are the pros and cons (if any) of using this method as opposed to using /appvve or /appvpid switches?

    8 Apr 2014 - Reply
    • Thamim Karim

      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

      8 Apr 2014 - Reply
  6. Richard

    Hi Thamim,

    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?

    Thanks,

    Richard

    8 Apr 2014 - Reply
    • Thamim Karim

      Hi Richard,

      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?

      8 Apr 2014 - Reply
      • Richard

        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.

        8 Apr 2014 - Reply
  7. Nathalie

    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

    8 Apr 2014 - Reply
  8. Nathalie

    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.

    8 Apr 2014 - Reply
    • Thamim Karim

      Are you sure they aren’t just there under the Program Files x86 location?

      8 Apr 2014 - Reply
  9. Anonymous

    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

    8 Apr 2014 - Reply
    • Thamim Karim

      Do you see the virtual system okay?

      8 Apr 2014 - Reply
  10. App-V 5.0 Ramp up Guide | VirtualVibes

    […] Breaking into the virtual environment in App-V 5.0 | Blog […]

    1 May 2014 - Reply
  11. Mukhtar Ahmed

    Am i correct in thinking that the second line should have “$appvpackagename” instead of “$appvpackage”

    like:-
    Start-AppvVirtualProcess -FilePath C:\Windows\System32\cmd.exe -AppvClientObject $appvpackagename

    22 Sep 2014 - Reply
    • Thamim Karim

      Yes you are! Good spot and I have changed accordingly..

      22 Sep 2014 - Reply

Leave a Reply

Your email address will not be published. Required fields are marked *