As part of our databuild run a 3rd party program (3D Studio Max) to export a number of assets. Unfortunately if a user is not currently logged in, or the machine is locked, then Max does not run correctly.

This can be solved for freshly booted machines by using a method such as TweakUI for automatic login. However when a user connects via Remote Desktop (to initiate a non-scheduled build, change a setting, whatever) then after the session ends the machine is left in a locked state with Max unable to run.

I'm looking for a way to configure windows (via fair means or foul) so either it does not lock when the remote session ends, or it "unlocks" itself a short while after. I'm aware of a method under XP where you can run a batchfile on the machine which kicks the remote user off, but this does not appear to work on Windows Server.

+3  A: 

There is a separate terminal service connection available called the 'console' connection.

You can connect to this space using mstsc /console /v:servername. Use mstsc /? for full command line options.

This allows you to connect, open up the terminal services manager and boot the bad sessions.

Note that this has changed in Windows Server 2008

You might want to look at using the "shadow" utility. This allows you to essentially proxy into an existing remote desktop session. You could log into the console of the machine with the account you need, then users could open non-console remote desktop sessions to the machine (or to another machine) then use shadow to connect to the same console session. The users will have to be in the administrators group on the machine.

Although, this might be as simple as telling people not to use the console session when logging into the machine using remote desktop.


Possible Solution from here.

To disable the Lock Computer button, open Regedit and browse to HKEYCURRENTUSER\Software\Microsoft\Windows\CurrentVersion\Policies\ System and HKEYLOCALMACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\ System and create a new REG_DWORD value in each called DisableLockWorkstation. Setting this value to 0 will allow the Lock Computer button to be used, while 1 will disable it.


Logging in over RDP shouldn't affect whether the console locks. If you don't log out of RDP (just closing the client keeps your session pending), then your session will be locked. You can solve that with idle timeouts in Terminal Services Manager.

If your console is locking, that's a seperate policy in Local Computer Settings or some such. If you have a domain, set it with a GPO. If you need the exact name of the policy, let me know and I'll dig it up for you.

Mark Brackett

There may be a problem if you are running these tasks as Administrator and others are logging in via Remote Desktop as Administrator. The task should be run from its own account.

+1  A: 

I assume by unlock you want to make sure that disconnected sessions are logged off. To do this

  1. Administrative Tools | Terminal Services Configuration
  2. Right-Click RDP-TCP on the Connections folder and choose Properties
  3. Go to the Sessions tab and select the Override user settings check box
  4. Configure the End a Disconnected session to your needed timeout value

more reading at


With the most recent terminal services client you can connect to the console using the /ADMIN switch.

So "Computer:" will be something like:

myworkstation.mydomain.local /ADMIN


Ed Haber