Hi everyone!
First of all we are currently beginning our journey towards using PSADT and I have successfully used 3.8.4 earlier but now Execute-ProcessAsUser seems to be broken.
I am trying to find where the issues is and so far it seems to be when it’s checking the literal path and it’s telling me that the variable cannot be null.
I am calling this function in Deploy-Application.ps1
Execute-ProcessAsUser -Path "C:\Windows\system32\notepad.exe"
(even tried with ’ instead of ")
This is the error from the log:
[Installation] :: Error Record:
-------------
Message : Cannot bind argument to parameter 'LiteralPath' because it is an empty string.
InnerException :
FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.TestPathCom
mand
ScriptStackTrace : at Execute-ProcessAsUser<Process>,
C:\temp\td_snap\install\AppDeployToolkit\AppDeployToolkitMain.ps1: line 7476
at <ScriptBlock>, C:\temp\td_snap\install\Deploy-Application.ps1: line 209
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1
PositionMessage : At C:\temp\td_snap\install\AppDeployToolkit\AppDeployToolkitMain.ps1:7476 char:36
+ If (Test-Path -LiteralPath $executeAsUserTempPath -PathType ' ...
+ ~~~~~~~~~~~~~~~~~~~~~~
The installation is running as SYSTEM so I want to try and call a function as the logged in user but if I can’t even launch Notepad.exe I am clearly doing something wrong.
Thanks for an otherwise awesome toolkit, looking forward to learn and expand my knowledge of PSADT.