STEAM GROUP
Steam Remote Play homestream
STEAM GROUP
Steam Remote Play homestream
2,303
IN-GAME
32,639
ONLINE
Founded
November 7, 2013
amorpheous May 16, 2015 @ 6:58am
Guide: Unlock a Windows host screen using Remote Desktop & a simple script.
TL;DR
Run this script as administrator:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$sessionid=((quser $env:USERNAME | select -Skip 1) -split '\s+')[2]; tscon $sessionid /dest:console" 2> UnlockErrors.log

Who is this guide for?

  • Security conscious users who DO NOT want to set up auto-login on their host Windows machines.
  • Users who use Remote Desktop to connect to their host machines (OPTIONAL - see Pre-requisites)
  • Users who keep their host machines always on OR use Wake-On-LAN to switch their host machines on remotely.
  • Lazy people like me who can't be bothered to walk two rooms over to unlock the host machines' screen in person.

Pre-requisites

  • Your host machine must be switched on (duh).
  • Your host machine must have Remote Desktop enabled and you must be able to login to it. If your client is a Windows machine you can use PsExec instead of using Remote Desktop. However, my client is a Mac so I need to use Remote Desktop. I may write a PsExec script which can be invoked from the client at some point, but I don't need it and I'm lazy so it might be a while (or never).
  • The user account you use to login to your host machine must have administrator privileges.

Putting It All Together

  1. Paste the script at the top into a text file and save it somewhere. I named mine UnlockScreen.cmd and saved it in my user directory.
  2. Create a shortcut to the script on your desktop or somewhere you can easily double-click on it from.
  3. Right-click the shortcut and bring up the Properties page.
  4. Click Advanced on the Shortcut tab
  5. Check the "Run as Administrator" checkbox and click OK
  6. Click OK again on the Properties page

Usage
  1. Remote into your machine and double-click the script. That's it. Simples.

NOTE: When you run the script, if it is successful your Remote Desktop session will end and will be disconnected. However, your host machine's screen will now be unlocked and you should be able to use Steam In-Home Streaming without Steam complaining with "The screen is locked on the remote computer" error.

Additional caveats - This has only been tested on a Windows 8.1 (now upgraded to Windows 10) Pro host machine. In theory it should work on Windows 7 and Windows 8 too, but if you have any issues have a look for anything obvious in the UnlockErrors.log file otherwise post here and I'll try to help if I can.

As noted here by mattrummins, the script will not work on Home versions of Windows.
Last edited by amorpheous; Jan 8, 2017 @ 5:03pm
< >
Showing 1-15 of 77 comments
om3g4_z3r0 Oct 4, 2015 @ 9:03am 
Thank you
Billy Burnt Butt Oct 31, 2015 @ 6:28am 
Can confirm that this works on Windows 7. Thanks so much for this guide! I've been trying to find a way to do this, and finally found it. You rock, mate.
amorpheous Nov 1, 2015 @ 9:37am 
No problem. Glad I could help.
Parabola Nov 7, 2015 @ 3:45pm 
and apparently i'm the only person on the planet NOT connecting from a windows machine. How would one do this from a mac?
amorpheous Nov 8, 2015 @ 8:23am 
Originally posted by Parabola:
and apparently i'm the only person on the planet NOT connecting from a windows machine. How would one do this from a mac?

Actually, I'm also streaming to a Mac. There is a Remote Desktop app in the Mac App Store from Microsoft which you should install. Here's the link: https://itunes.apple.com/gb/app/microsoft-remote-desktop/id715768417?mt=12
Digital D. Nov 8, 2015 @ 12:33pm 
Does this work at all on Windows 10?
Parabola Nov 8, 2015 @ 12:49pm 
Originally posted by amorpheous:
Originally posted by Parabola:
and apparently i'm the only person on the planet NOT connecting from a windows machine. How would one do this from a mac?

Actually, I'm also streaming to a Mac. There is a Remote Desktop app in the Mac App Store from Microsoft which you should install. Here's the link: https://itunes.apple.com/gb/app/microsoft-remote-desktop/id715768417?mt=12


thanks for the reply, but the issue is having the session not disconnect, which even console session doesn't solve. A DVI dummy plug is whats needed.

but after the absymial performance of any FPS over gbit wired lan (20-25% of native on the host) i've chalked this up as a failed implementation of a wild technology. and have moved on.
amorpheous Nov 8, 2015 @ 3:25pm 
Originally posted by Digital D.:
Does this work at all on Windows 10?
Yes, I upgraded my machine to Windows 10 a few weeks ago and it still works.
amorpheous Nov 8, 2015 @ 3:31pm 
Originally posted by Parabola:

thanks for the reply, but the issue is having the session not disconnect, which even console session doesn't solve. A DVI dummy plug is whats needed.

I'm not quite sure what any of that means. Are you running Windows Server on your host?

but after the absymial performance of any FPS over gbit wired lan (20-25% of native on the host) i've chalked this up as a failed implementation of a wild technology. and have moved on.

Fair enough. For what it's worth, I'm streaming over WiFi to an early 2011 Macbook Pro. In my living room, I get perfect performance, i.e. no lag or stuttering, however in the bedroom I get a lot of dropped frames even though my gaming rig is on the same floor. I've given up gaming in the bedroom now anyway since I'd rather not disturb the baby and wife...
Last edited by amorpheous; Nov 8, 2015 @ 3:33pm
luv myxtic Nov 12, 2015 @ 9:15pm 
Originally posted by Digital D.:
Does this work at all on Windows 10?

@Digital D. Yes, Works perfect!
Last edited by luv myxtic; Nov 12, 2015 @ 9:15pm
inzKulozik Dec 30, 2015 @ 11:05pm 
Hi,
There is a possibility to run this script remotely from Steam Link ?
amorpheous Jan 1, 2016 @ 8:23am 
Originally posted by inzKulozik:
Hi,
There is a possibility to run this script remotely from Steam Link ?


I don't have a Steam Link so I can't test.

However, I think Steam Link runs on Linux and I don't know of any way of executing remote scripts on Windows from a Linux machine.
gekiganger Jan 8, 2016 @ 8:06pm 
I tried this and it works... But now I can't use remote desktop anymore even after reboot. What do I do?
amorpheous Jan 10, 2016 @ 6:47am 
Originally posted by gekiganger:
I tried this and it works... But now I can't use remote desktop anymore even after reboot. What do I do?

Did you check your Remote Desktop settings to see if it's enabled? Maybe it got disabled somehow. I've never seen that happen before so I've no idea what could cause it. Which version of Windows are you on?
Mio Rin Jan 11, 2016 @ 6:06pm 
I use TightVNC on the windows host.
It lets you remote in and unlock the screen like you were at the machine itself from any computer that supports VNC protocol (f.ex. another windows machine with TightVNC, or any *nix-based system).

Works wonders. :)

Have Fun! :D
< >
Showing 1-15 of 77 comments
Per page: 1530 50

Date Posted: May 16, 2015 @ 6:58am
Posts: 77