App-V Tokens in shortcut file path arguments doesn't get expanded correctly
We have a few packages that create shortcuts that takes other files as arguments like so:
"C:\App\app.exe" -run "C:\App\app2.exe"
When we sequence a package like this and then publish it using the latest App-V client, the resulting shortcut becomes something like this:
"%LOCALAPPDATA%\Microsoft\AppV\Client\Integration\47A751EF-2D5C-4F58-804F-87F29B6249E6\Root\VFS\AppVPackageDrive\App\app.exe" -run "C:\App\app2.exe"
Obviously, the file path "C:\App\app2.exe" exists only inside the virtual environment, so the app fails to find the file and exits with an error.
The correct behavior should be to have the path expanded into the following:
"%LOCALAPPDATA%\Microsoft\AppV\Client\Integration\47A751EF-2D5C-4F58-804F-87F29B6249E6\Root\VFS\AppVPackageDrive\App\app.exe" -run "%LOCALAPPDATA%\Microsoft\AppV\Client\Integration\47A751EF-2D5C-4F58-804F-87F29B6249E6\Root\VFS\AppVPackageDrive\App\app2.exe"
Editing the shortcut manually to the above will result in a working shortcut.
In fact, App-V used to do this correctly before the PVAD change. Many of our older packages that used PVAD had similar shortcuts, and all of them were getting expanded correctly without any additional effort on our part. So this is almost certainly a valid bug and regression.