{"id":206,"date":"2015-06-14T23:59:57","date_gmt":"2015-06-14T12:59:57","guid":{"rendered":"https:\/\/4it.com.au\/kb\/?post_type=article&#038;p=206"},"modified":"2022-11-14T20:05:43","modified_gmt":"2022-11-14T09:05:43","slug":"how-to-automatically-logon-and-lock-a-windows-server","status":"publish","type":"article","link":"https:\/\/4it.com.au\/kb\/article\/how-to-automatically-logon-and-lock-a-windows-server\/","title":{"rendered":"How to Automatically Logon and Lock a Windows Server"},"content":{"rendered":"<p>Sometimes there is software which runs on a Windows Server which can&#8217;t be started at a service. \u00a0The easiest way around this is to Automatically Logon to the Server, Automatically Start the Software and then Automatically Lock the Windows Server.<\/p>\n<p>There are three steps that you will need to complete to accomplish this.<\/p>\n<h2>1. Set up the Windows Server to Automatically Logon upon reboot.<\/h2>\n<p>This article will assume you are already familiar with working in the registry editor.<\/p>\n<h3>Step 1<\/h3>\n<p>First of all you will need to open up the registry editor on the server. &#8211; Start &gt; regedit<\/p>\n<h3>Step 2 &#8211; Navigate to the following registry subkey<\/h3>\n<p><code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon<\/code><\/p>\n<p>The following strings\u00a0need to be set. \u00a0If any of the strings are not present you will need to create a new String<\/p>\n<p><a href=\"https:\/\/4it.com.au\/kb\/wp-content\/uploads\/2015\/06\/New-String.png\"><img class=\"aligncenter size-full wp-image-207\" data-original=\"https:\/\/4it.com.au\/kb\/wp-content\/uploads\/2015\/06\/New-String.png\" alt=\"New String\" width=\"301\" height=\"196\" \/><\/a><\/p>\n<ul>\n<li>AutoAdminLogon &#8211; 1<\/li>\n<li>DefaultDomainName &#8211; Your Domain Name<\/li>\n<li>DefaultUsername &#8211; Your Username<\/li>\n<li>DefaultPassword &#8211; Your Password<\/li>\n<\/ul>\n<p><strong><em>Please Note:<\/em><\/strong><\/p>\n<p><em>To bypass the AutoAdminLogon process and to log on as a different user, press and hold the Shift key after you log off or after Windows restarts.<\/em><\/p>\n<p><em>If no DefaultPassword string is specified, Windows automatically changes the value of the <b>AutoAdminLogon<\/b> key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.<\/em><\/p>\n<h2>2. Automatically Start the Required Program<\/h2>\n<p>This one&#8217;s a simple as creating a shortcut to the program and adding it to your users startup directory.<\/p>\n<h2>3. Automatically Lock the Server after Logon<\/h2>\n<h3>Step 1 &#8211; Create a new Notepad Document and place the following text in it<\/h3>\n<p><code>@echo off<br \/>\n%windir%\\System32\\rundll32.exe user32.dll,LockWorkStation<br \/>\nexit<\/code><\/p>\n<h3>Step 2<\/h3>\n<p>Save the autolock as a batch file. \u00a0Be sure to change the &#8220;Save as Type&#8221; to All Files (*.*)<\/p>\n<h3><a href=\"https:\/\/4it.com.au\/kb\/wp-content\/uploads\/2015\/06\/Save-as-Batch-File.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-208\" src=\"https:\/\/4it.com.au\/kb\/wp-content\/uploads\/2015\/06\/Save-as-Batch-File.png\" alt=\"Save as Batch File\" width=\"269\" height=\"83\" \/><\/a><br \/>\nStep 3<\/h3>\n<p>Create a shortcut to the batch file and add to the users startup directory.<\/p>\n<p><a href=\"https:\/\/4it.com.au\/kb\/wp-content\/uploads\/2015\/06\/Startup-Directory.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-209\" src=\"https:\/\/4it.com.au\/kb\/wp-content\/uploads\/2015\/06\/Startup-Directory.png\" alt=\"Startup Directory\" width=\"266\" height=\"57\" \/><\/a><\/p>\n<h2><span style=\"color: #ff0000\">Security Implications<\/span><\/h2>\n<p><span style=\"color: #ff0000\">If you haven&#8217;t already noticed, the password for the computer is now stored in the Windows Registry as Plain Text. \u00a0If the password is sensitive to others using the same server this probably won&#8217;t work for you. \u00a0Anyone who has permissions\u00a0to log on to the server will be able to go to the registry editor and see the password. \u00a0In smaller environments this isn&#8217;t an issue but for larger corporations it may.<\/span><\/p>\n<p>&nbsp;<\/p>\n<div style='text-align:left' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>Sometimes there is software which runs on a Windows Server which can&#8217;t be started at a service. \u00a0The easiest way around this is to Automatically Logon to the Server, Automatically Start the Software and then Automatically Lock the Windows Server. There are three steps that you will need to complete to accomplish this. 1. Set [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","article-category":[57],"article-tag":[148,149],"class_list":["post-206","article","type-article","status-publish","format-standard","hentry","article-category-windows-server","article-tag-autologon","article-tag-automatically-lock-server"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":5,"sum_votes":17},"_links":{"self":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/comments?post=206"}],"version-history":[{"count":0,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/206\/revisions"}],"wp:attachment":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/media?parent=206"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-category?post=206"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-tag?post=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}