Currently trying to deploy SAP GUI and it is working with the exception that when I run .exe it Execute-Process, the .exe returns 0 and the script exits. The installing GUI remains on the screen but when I check the logs it has finished up:
##* INSTALLATION
##*===============================================
[string]$installPhase = 'Installation'
## Handle Zero-Config MSI Installations
If ($useDefaultMsi) {
[hashtable]$ExecuteDefaultMSISplat = @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
}
## <Perform Installation tasks here>
Execute-Process -Path "$dirFiles\Setup\NwSapSetup.exe" -Parameters '/product=SAPGUI /silent'
##*===============================================
##* POST-INSTALLATION
##*===============================================
the log:
Currently trying to deploy SAP GUI and it is working with the exception that when I run .exe it Execute-Process, the .exe returns 0 and the script exits. The installing GUI remains on the screen but when I check the logs it has finished up:
##*===============================================
##* INSTALLATION
##*===============================================
[string]$installPhase = 'Installation'
## Handle Zero-Config MSI Installations
If ($useDefaultMsi) {
[hashtable]$ExecuteDefaultMSISplat = @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
}
## <Perform Installation tasks here>
Execute-Process -Path "$dirFiles\Setup\NwSapSetup.exe" -Parameters '/product=SAPGUI /silent'
##*===============================================
##* POST-INSTALLATION
##*===============================================
the log:
[11-18-2019 16:46:01.279] [Installation] [Execute-Process] :: [\vmware-host\Shared
Folders\Documents\PSAppDeployToolkit\3.8.0\SAPGUI750\Files\Setup\NwSapSetup.exe] is a valid
fully qualified path, continue.
[11-18-2019 16:46:01.344] [Installation] [Execute-Process] :: Working Directory is [\\vmware-
host\Shared Folders\Documents\PSAppDeployToolkit\3.8.0\SAPGUI750\Files\Setup].
[11-18-2019 16:46:01.356] [Installation] [Execute-Process] :: Executing [\\vmware-host\Shared
Folders\Documents\PSAppDeployToolkit\3.8.0\SAPGUI750\Files\Setup\NwSapSetup.exe
/product=SAPGUI /silent
]...
[11-18-2019 16:49:30.202] [Installation] [Execute-Process] :: Execution completed successfully with
exit code [0].
PS C:\Windows\system32>
Application installs fine but script doesn’t continue to Post-Installation