PSADT 3.8.4 - No Messages (e.g. Show-InstallationWelcome,etc.) are not showing up in an RDP session

Hi Everybody.

I have got the problem, that the InstallationWelcome-, Progressinformationmessages are not showing up while connected via RDP to a clientsystem.
When I am physically connected to a client, everything is working like expected.

Is there a possibility to show up these messages during an RDP session ?

Any help would be appreciated.

Thanks in advance.

This is due to RDP using a different session than “session 0” which is the interactive local session whereas SCCM tends to use session 0.

RDP used to default to session 1 but i think that is no longer the case as my one system is in session 2 at the moment.

You can validate it with this simple powershell command:
powershell (Get-Process -PID $pid).SessionID

I’ve written a wrapper that addresses this which leverages psexec (from and ServiceUI which is a tool from either WinPE or MDT, I can’t recall the source but it’s one of those two that allows you to spawn processes to specific sessions.

Here’s the code (it converted straight quotes with smart quotes. be sure to fix those):

@echo off
::launch powershell to find out what session we’re in
for /f "usebackq tokens=* delims= " %%a in (powershell ^(Get-Process -PID $pid^).SessionID) do set sessionid=%%a
:: is this session > 0, then we should be in the same session as the user, run as usual.
if %sessionid% gtr 0 goto Interactive

:: we’re in session 0, let’s look for explorer.exe which should only be running in the user’s session. Use psexec and serviceUI to check which session explorer.exe is in and spawn deploy-application in the same session
goto session0

PSExec.exe -si -accepteula “%~dp0ServiceUI.exe” -process:explorer.exe “%~dp0Deploy-Application.exe” %1 %2 %3 %4
echo %errorlevel%

goto end

“%~dp0Deploy-Application.exe” %1 %2 %3 %4 %5 %6 %7 %8 %9
echo %errorlevel%

exit %errorlevel% /b

I wrap the install.cmd with a .vbs to run it hidden to suppress the cmd window. So in SCCM, install.vbs is called which calls install.cmd which does whatever work is required to get deploy-application to launch in the correct session.

Keep in mind this will only work for the first “explorer.exe” it finds. if multiple users are logged in but several are disconnected, i’m not sure how it will behave.

Hope that helps.

Thanks for your reply.
Can you tell me how you wrap this with the .vbs script?

Can you Share the vbs Script ?

Thanks in advance

It’s just a simple to run hidden.

Set Shell = createobject("")

'On Error Resume Next
' 0 = hidden.  "True" = wait for execution to finish
	ExitCode = GetErrorState(Shell.Run(shell.ExpandEnvironmentStrings(scriptpath & "install.cmd"),0,True))


Function ScriptPath()
    ScriptPath = Left(Wscript.scriptfullname, InstrRev(WScript.ScriptFullName, wscript.scriptname, -1, 1) - 1)
End Function

It can be done much simpeler. Just run this commando

ServiceUix86.exe deploy-application.exe install

In sccm, Mark the “run as 32 proces”

No need for session check.

What I did is create an if statement around the welcome message that if silent is false, it shows the popus.

Typing this on my phone now, will post the code tomorrow if you want.

Thanks for the Code. I had this alteady in the Installation and uninstallation program. But in an RDP Session it will not Show up. What could there be the Problem ?

Thanks in advance.

Please also Share the Code. Thanks

i believe i tried running serviceui directly but was not having success with it which is why it got a little more… involved :slight_smile: