Problems with VBScript RRS feed

  • General discussion

  • Hello everyone!

    I got a bunch of Windows 10 LTSC 2019 systems that operate like a Thin Client. I have a Custom User Interface GPO set currently that launches a custom RDP file on login and it works fine. The issue i'm having is when users log off of that... it goes to a black screen. I'd like the RDP session to start at login but also logout of the local system once they logoff or kill the RDP instance. I created a VBScript to do that but it doesn't appear to be working. Thoughts? Thanks!

    My Script:

    Set objShell = WScript.CreateObject("WScript.Shell")    
    objShell.Run "C:\Windows\System32\MSTSC.exe C:\Comp\Shortcuts\RDP\TS.rdp", 1, True
    objShell.Run "C:\Windows\System32\Shutdown.exe /l", 0, False

    Sunday, February 9, 2020 11:35 PM

All replies

  • You can have the system run MSTSC as a shell. When that shell ends the session will logout.  Ask in the GP forum how to assign a custom shell using a GPO.


    Sunday, February 9, 2020 11:40 PM
  • Hello jrv Consultant,

    I have done that already but it isn't logging off once the MSTSC application closes on the local machine. I read online to use a script as the shell instead but all the scripts I found online don't appear to be working. Any ideas?

    Sunday, February 9, 2020 11:44 PM
  • You obviously didn't set up the user correctly.  The issue is not about scripting.  It is about Windows and how to create an alternate shell.  YOu likly just specified an initial program and not a shell replacement.

    Post in GP forum for help using GP.


    Monday, February 10, 2020 12:54 PM