views:

3715

answers:

7

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.

samjudson
Note that this has changed in Windows Server 2008http://blogs.msdn.com/nickmac/archive/2007/11/28/mstsc-console-switch-in-windows-server-2008-and-windows-vista-sp1.aspx
Schnapple
A: 

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.

Wedge
A: 

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.

jms
A: 

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
A: 

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.

Joseph
+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 http://technet.microsoft.com/en-us/library/cc758177.aspx

jwmiller5
A: 

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

Ed Haber