I'm trying to transition a set of Powershell scripts that launches App-V applications, after upgrading the App-V server from version 4.x to 5.x. Previously, I used the following command to do so:
sfttray.exe /launch $appName
The sfttray command introduced an optional /exe switch when running the /launch command:
Used with /LAUNCH to specify that an executable program is to be started in
the virtual environment when a virtual application is started in place of
the target file specified in the OSD.
I've read that App-V 5.x has done away with the sfttray.exe, and my alternative is to use the Start-AppvVirtualProcess cmdlet. It seems that Start-AppvVirtualProcess requires two parameters: AppvClientObject and FilePath. Every example I've seen so far has been of the following format:
Start-AppvVirtualProcess -FilePath "C:\Calc.exe" -AppvClientObject $appVObj
This launches Calc.exe within the passed in App-V Object, and seems to be the App-V 5.x equivalent of:
sfttray.exe /launch $appVObj.Name /exe Calc.exe
But what if I don't want to launch an alternate program? How do I get the file path to the target application in the .appv package?
There are three ways of launching a local system process inside of an App-V package. Thes first is the one you described, but you can also launch any process with /appvve: command switch, and windows will open it in the specified application package or connection group.
For more information see this Microsoft Support Article.