Get-AppvClientPackage PowerShell Cmdlet
You can use the Start-AppVVirtualProcess cmdlet to retrieve the package name and then start a process within the specified package's virtual environment (substitute the name of your package for "<Package>"):
Hint: If you do not know the exact name of your package, you can use the command line Get-AppvClientPackage *executable*, substituting the name of the application for "executable"; for example: Get-AppvClientPackage *Word*.
This method allows you launch any command within the context of an App-V package whether the package is currently running or not. This is similar to using the sfttray /exe cmd.exe /launch "App-V Application" syntax in App-V 4.6.
The Command Line Switch “/appvpid:<PID>”
This allows you to apply the /appvpid switch to any command which will allow the command to run within the virtual process of the virtual process you selected by its PID (Process ID) as in the example below:
To obtain the process ID (PID) of your App-V process, use the command tasklist.exe from an elevated command prompt and obtain the PID of your process. This method has the advantage of launching the new executable in the same App-V environment as an already-running executable.
The Command Line Hook Switch “/appvve:<GUID>”
Where the /appvpid switch requires the virtual process to already be running, this switch allows you to start a local command and allow it to run within the virtual environment of an App-V package and will initialize it. The syntax is as follows:
To obtain the package GUID and version GUID, of your application, run the Get-AppvClientPackage cmdlet, then concatenate the package GUID and version GUIDs with an underscore between them. For example:
would yield the command line:
If you are working within RDS environments, and have a package that is published globally, you can also take advantage of the “Run Virtual” feature. To do this, the add process executable names as subkeys of the following key:
For example, if you have a locally installed application named MyApp.exe and would like this application to run within the virtual environment, create a subkey called MyApp.exe. Edit the (Default) REG_SZ value that contains the package GUID and the version GUID separated by an underscore (i.e. <GUID>_<GUID>.
For example, the application listed in the previous example would yield a registry export (.reg file) like the following:
Each native process that needs to run locally will require its own subkey beneath the Run Virtual key. As long as there is one version of the EXE on the system, placing the package\version GUID combination in the default key value will suffice. If there is more than one version of the EXE installed on the machine, you will need to create a new REG_SZ value beneath the subkey and specify the value name by using the full path to the EXE.
Article ID: 2848278 - Last Review: 09/16/2013 21:08:00 - Revision: 4.0