I have an application which runs in system context but after installation completes i need to start an executable which resides in the users appdata.
My command so far is:
Execute-Process -FilePath "$envUserProfile\AppData\App\App.exe"
But looking at the log it tries to launch it as:
C:\Windows\System32\Config\SystemProfile\AppData\App\App.exe
The path above is normal i guess for system context but i would think using $envUserProfile it should translate into the users profile. Is there any other way to do this? Ive tried Execute-ProcessAsUser but that just starts the program in user context, it still doesnt translate into the AppData path.