Hi all,
Recently I discovered PSAppDeployToolkit and it will be really benefit in my company to deploy applications in specific cases, thank you for the project, very appreciated.
The first thing I want to do is to deploy an new version of MSRDC, no problem with that. But I would like to clean up old user installs. This is why I use Execute-ProcessAsUser.
I’m using the command presented in the example with ps.exe which works fine but displays a ps.exe window for a short time.
Execute-ProcessAsUser -Path "$PSHOME\powershell.exe" -Parameters "-Command & { & `"msiexec.exe /x '$GUID' /qn`"; Exit `$LastExitCode }" -Wait
I have already seen in another topic that the Execute-ProcessAsUser creates a scheduled task for snapshot and there is no possibility to hide a ps.exe window through scheduled task.
I already tried to add “-WindowStyle Hidden” but yeah, that change nothing.
So I tried to push directly the msiexec.exe command but I’m not able to make it works. Any advices?
Execute-ProcessAsUser -Path "$WINDIR\System32\msiexec.exe" -Parameters "/x '$GUID' /qn"; Exit `$LastExitCode }" -Wait
Thank you all by advance,
Axelo2