Need to run Regedit and other tools inside your applicaiton's bubble/process ?
We often need to see what the application sees inside its process, so we want to inject/launch one of our tools into the process to achieve this.
You can use the Start-AppVVirtualProcess PowerShell 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>" below):
$AppVName = Get-AppvClientPackage <Package>
Start-AppvVirtualProcess -AppvClientObject $AppVName cmd.exe
Note: We use a PowerShell varibale $AppVName to store the package's details, this makes it easier/quicker to refer to this package later. Or you can use Get-AppvClientPackage to get the package(s) details and use the package name from there. Type $AppVname to see its contents.
We can now explore the process environment from the this new Command prompt. We can run Regedit and see the HKCU\Software\MyApp\.. keys as it should appear to the applicaiton for example.
The Command Line Switch “/appvpid:<PID>”
If the Application is already running you can 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:
Start-AppvVirtualProcess -AppvClientObject $AppVName cmd.exe /appvpid:7160
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:
Start-AppvVirtualProcess -AppvClientObject $AppVName cmd.exe /appvve:aaaaaaaa-bbbb-cccc-dddd-eeeeeeee_11111111-2222-3333-4444-55555555