Reputation: 58804
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.
Upvotes: 10
Views: 23735
Reputation: 1877
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
Upvotes: 1
Reputation: 2604
I assume by unlock you want to make sure that disconnected sessions are logged off. To do this
more reading at http://technet.microsoft.com/en-us/library/cc758177.aspx
Upvotes: 1
Reputation: 1849
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.
Upvotes: 0
Reputation: 85685
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.
Upvotes: 1
Reputation: 9980
Possible Solution from here.
To disable the Lock Computer button, open Regedit and browse to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ System and HKEY_LOCAL_MACHINE\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.
Upvotes: 1
Reputation: 19875
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.
Upvotes: 0
Reputation: 56913
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.
Upvotes: 4