I have recently started having problems with the ServiceUI I always get the error:
The exit code is: ======================= Matched Processes ======================= Process Found: [explorer.exe] ID [7076] SESSION [1] ======================= Logon Lookup ======================= [winlogon.exe] Session: [1] PID [696] [Target Session [1] = Match] ======================= Launch Process ======================= Program to launch : [Deploy-Application.exe] Command line : [Deploy-Application.exe] API [CreateProcessAsUser] Error: [5] ======================= Exiting with [-1] =======================
Unfortunately I have no idea what the problem could be.
Specifies the name of the process check for to trigger the interactive installation. Default value is ‘explorer’. Multiple values can be supplied such as ‘app1’,
‘app2’. The .exe extension must be omitted.
Try this: $exitcode = .\Invoke-ServiceUI.ps1 -ProcessName 'explorer' -DeploymentType 'Install' -AllowRebootPassThru
Or this (since explorer is the default process): $exitcode = .\Invoke-ServiceUI.ps1 -DeploymentType 'Install' -AllowRebootPassThru