Creating a Windows ThinPC Thin Client


I have spent some time researching windows Thin PC Thin Clients. My self and a colleague Chris Shaw came up with a solution that loads a RDP file from the root directory (C:\>).

My RDS environment has multiple VDI pools so i needed to use a RDP file to load VDI sessions.

You can use redirection using a Connection Broker but there are limitations: you can only redirect to one VDI pool if you have a Highly Available Connection Broker configuration.

Redirection would be great for organisations that have one template but for organisations that wish to use multiple VDI pools, i would recommend using RDP files.

Creating a Windows Thin PC Client – MSTSC Client

You will need to create a number of files in a folder stored on the root directory C:\MSTSC\

Name the first file “Installmstsc.cmd”

add the following content

@rem Add a user called "user" with the password "user"
net user user user /ADD /PASSWORDCHG:NO /FULLNAME:"RDS User"
net localgroup administrators /add user
@rem Add the following registry key changes:
regedit /s C:\mstsc\mstsc-1.reg
@rem This allows the user account to auto login. Log in as local Administrator by holding the Shift key when logging out
@rem Reboot the system to modify the user account shell.
C:\mstsc\shutdown.exe -r -t 5

Create the file name “Launchmstsc.cmd”

@echo off
:RDS
"C:\mstsc\RDP.RDP"
goto RDS

create a file named “LaunchMSTSC.vbs”

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\mstsc\launchmstsc.cmd" & Chr(34), 0
Set WshShell = Nothing

Create a file named “mstsc-1.reg”

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="user"
"DefaultPassword"="user"
"AutoAdminLogon"="1"
"ForceAutoLogon"="1"
"LogonType"="0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"UserRunOnce"="C:\\mstsc\\UserRunOnce.cmd"

Create a file named “mstsc-2.reg”

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="wscript C:\\mstsc\\launchmstsc.vbs"
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WallPaper"=""
"OriginalWallPaper"=""
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"DisableTaskMgr"="1"
"DisableLockWorkstation"="1"
"DisableChangePassword"="1"

Create a file named “UserRunOnce.cmd”

regedit.exe /s C:\mstsc\mstsc-2.reg
net localgroup administrators /remove user
C:\mstsc\shutdown.exe -r -t 5 -f -c "Now rebooting"

Add the RDP file

You can download the VDI pool RDP file from the RDWeb site. Rename the file to RDP.RDP or to what ever your preference is. If you do rename the file, ensure you change all the scripts to match the new RDP file name.

Copying the Shutdown file

Copy the shutdown file from the following directory:

 C:\Windows\winsxs\x86_microsoft-windows-shutdown-event-tracker_31bf3856ad364e35_6.1.7600.16385_none_02aa6dd4294b8d5f

Completed Folder for RDP Thin Client:

  • InstallMSTSC.cmd
  • LaunchMSTSC.cmd
  • LaunchMSTSC.vbs
  • mstsc-1.reg
  • mstsc-2.reg
  • RDP.RDP
  • UserRunOnce.CMD
  • Shutdown file

You can download these files from my Public Skydrive:

You will need to run the InstallMSTSC.cmd as the administrator. you will then be prompted with a shutdown message.

Once the client shutdowns and reboots, you will be presented with a MSTSC login screen for the assigned VDI pool.

There you have it – Windows ThinPC Thin Client.

We have tried this on IGEL UD3 W7 clients, Wyse Z90DE7 terminals, and on Windows Thin PC OS from MS software assurance.

Thinclient

21 thoughts on “Creating a Windows ThinPC Thin Client

Add yours

  1. didn’t really work – not on a 64 bit Win7
    Can’t get out of the RDP loop – even with the shift key. I can get a logon – and I can logon as a different user once – then if I try to log on as that user again I get caught in the RDP loop

      1. I’m having this same issue. Win7 x64 – I ran as an admin, but the computer gets stuck looping the rdp.rdp file. Left running for a few minutes, there are hundreds of rdp windows open.

        This does work on Windows ThinPC, though.

    1. This loop is caused by the launchmstsc.cmd file. At the end of the command execution, it goes back to RDS and runs it again. I deleted the “goto RDS” line and the “:RDS” line and this fixed the issue

      1. I am just loading mstsc under the admin account, and it will work properly, no loop after deleting those lines. However, if I sign out of the newly created user that auto logs in to RDS, login as admin, and log back out, the configurations are lost. It does work if I just power off the machine while logged in as RDS user, and have it auto login back to the RDS user. Any insight on this?

        Basically the startup config gets lost if I log out of RDS user

  2. Thanks for all.
    But can you add the “Start button” for having the possibility to
    Log off
    Restart
    Sleep
    Shutdown the client

    Regards

  3. I got this working first pop and its fantastic!!!

    However, how do I get back to the normal windows environment should I want to roll the device back to a standard desktop for maintenance or change the configuration files?

  4. for RDP v8.1 + RemFX and fix loop
    launchmstsc.cmd

    @Echo Off
    SetLocal EnableExtensions
    Set put=C:\mstsc\rdp.rdp
    Set ProcessName=mstsc.exe
    Start %put%
    :1
    cls
    TaskList /FI “Windowtitle EQ Remote Desktop Connection” | Find /I “%ProcessName%”
    If %ErrorLevel% NEQ 0 Start %put%
    ping -n 3 127.0.0.1 > NUL
    goto :1

  5. Hi Ryan, I installed it on an Intel Stick running Windows 10… It worked the first time.
    Thanks for your work! You should sell it to Microsoft 🙂
    Mike

  6. Hi ! This is just great !!! Thank you :). Just one question: i need to change rdp file in MSTSC. How to do that ? I can’t find a way to access OS folder structure.
    Zoran

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑