App-V Calling an Exe in the VMFS due the environment variable

247 views Asked by At

I have two question regarding the latest App-V that comes with Windows 10. I sequenced an application which has the following structure:

  • Program files\OwnApp\run.ps1
  • Program files\Firefox\firefox.exe
  • Program files\java (some old version)

Now, I need to run Firefox through my own app/script, which is linked due the environment variable. But by using App-V, the env variables does not point to my vmfs but instead to my local drive. Is there any way, how I can link the PowerShell file to the correct Firefox version in my vmfs but without hardcoding?

    "${env:programfiles} (x86)$browser"

Besides, in my PowerShell file I create a log file in the app folder. Unfortunately, I get an access denied error unless I change the permission in the program data folder.

    Out-file : Access to the path 'C:\ProgramData\Microsoft\AppV\Client\Integration\AD721672-C59B-4FB4-9EBB-E23AD314A95D\Root\VFS\ProgramFilesX86\OwnApp\OwnApp.log' is denied.

How I can still write the file without manually changing permisson after installation? Was this not one benefit of AppV that the user has write permisson?

Thanks in advance Stephan

1

There are 1 answers

1
rtranchilla On

In the past if I needed the non-virtualized path to an internal location i have run as Get-Package command for something like below. Its less than ideal, but there are worse solutions.

$Pkg = Get-AppvClientPackage Interlogix_TruVision_7.1_Prod
"$env:ProgramData\$($Pkg.PackageId)\$($Pkg.VersionId)\Root\Vfs"

Also, It looks like you do not have the VFS write permissions box checked in your package. That is the most common reason that you would get an unexpected Access Denied.