Code: Select all
$serviceDir = AI_GetMsiProperty service_Dir
Start-Process -FilePath "run.bat" -WorkingDirectory $serviceDir
I have tried forcing additional single or double quotes around the string:
Code: Select all
Start-Process -FilePath "run.bat" -WorkingDirectory "'$serviceDir'"
It appears it does not like the leading quoteDumping PowerShell invoke log ...
--> Found PowerShell path: C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe
--> PowerShell Script Execution Result Code: 574
--> PowerShell Script Execution log:
Start-Process -FilePath "run.bat" -WorkingDirectory C:\Program Files\Test\service\
C:\Users\IEUser\AppData\Local\Temp\pss2AB4.ps1 : Caught Exception: Cannot find drive. A drive with the name ''C' does not exist.
+ CategoryInfo : NotSpecified: (:) , WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,pss2AB4.ps1
The same code appears to work from the PowerShell command line, i.e. outside of Advanced Installer
Any help would be greatly appreciated.
FOLLOW US
Get the latest news in Application Packaging