<p>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.</p>

<p>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.</p>

<p>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.</p>

[{'answer_id': 18740, 'author': 'samjudson', 'author_id': 1908, 'author_profile': 'https://Stackoverflow.com/users/1908', 'pm_score': 2, 'selected': False, 'text': "<p>There is a separate terminal service connection available called the 'console' connection.</p>\n\n<p>You can connect to this space using mstsc /console /v:servername. Use mstsc /? for full command line options.</p>\n\n<p>This allows you to connect, open up the terminal services manager and boot the bad sessions.</p>\n"}, {'answer_id': 18762, 'author': 'Wedge', 'author_id': 332, 'author_profile': 'https://Stackoverflow.com/users/332', 'pm_score': 0, 'selected': False, 'text': '<p>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.</p>\n\n<p>Although, this might be as simple as telling people not to use the console session when logging into the machine using remote desktop.</p>\n'}, {'answer_id': 18769, 'author': 'jason saldo', 'author_id': 1293, 'author_profile': 'https://Stackoverflow.com/users/1293', 'pm_score': 0, 'selected': False, 'text': '<p>Possible Solution from <a href="http://www.2000trainers.com/tweaking-xp/disable-system-locking-on-windows-xp/" rel="nofollow noreferrer">here</a>.</p>\n\n<blockquote>\n  <p>To disable the Lock Computer button,\n  open Regedit and browse to\n  HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\\n  System and\n  HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\\n  System and create a new REG_DWORD\n  value in each called\n  DisableLockWorkstation. Setting this\n  value to 0 will allow the Lock\n  Computer button to be used, while 1\n  will disable it.</p>\n</blockquote>\n'}, {'answer_id': 18958, 'author': 'Mark Brackett', 'author_id': 2199, 'author_profile': 'https://Stackoverflow.com/users/2199', 'pm_score': 1, 'selected': False, 'text': "<p>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.</p>\n\n<p>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.</p>\n"}, {'answer_id': 19029, 'author': 'Joseph', 'author_id': 2209, 'author_profile': 'https://Stackoverflow.com/users/2209', 'pm_score': 0, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 154452, 'author': 'jwmiller5', 'author_id': 7824, 'author_profile': 'https://Stackoverflow.com/users/7824', 'pm_score': 1, 'selected': False, 'text': '<p>I assume by unlock you want to make sure that disconnected sessions are logged off. To do this</p>\n\n<ol>\n<li>Administrative Tools | Terminal Services Configuration</li>\n<li>Right-Click RDP-TCP on the Connections folder and choose Properties</li>\n<li>Go to the Sessions tab and select the Override user settings check box</li>\n<li>Configure the End a Disconnected session to your needed timeout value</li>\n</ol>\n\n<p>more reading at <a href="http://technet.microsoft.com/en-us/library/cc758177.aspx" rel="nofollow noreferrer">http://technet.microsoft.com/en-us/library/cc758177.aspx</a></p>\n'}, {'answer_id': 154546, 'author': 'Ed Haber', 'author_id': 2926, 'author_profile': 'https://Stackoverflow.com/users/2926', 'pm_score': 0, 'selected': False, 'text': '<p>With the most recent terminal services client you can connect to the console using the /ADMIN switch.</p>\n\n<p>So "Computer:" will be something like:</p>\n\n<pre><code>myworkstation.mydomain.local /ADMIN\n</code></pre>\n\n<p>-Ed</p>\n'}]
['https://Stackoverflow.com/questions/18719', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1043/']