Automatic log-in, updates and automatic running of programs in Windows

Autologin, updates and startup programs in Windows

“Hello, I found out that my server has restarted unintentionally. Do you have any idea why?”. Our technical support receives precisely this question over and over again. Unfortunately, we reply by asking another question: “How did you configure automatic updates?”, and the customer is not sure. One of the most frequent causes for the restart of a virtual server running MS Windows is the above-mentioned automatic update feature.

An updated and patched operating system is an essential requirement for trouble-free server operation. If you do not want to think about system updates and to make sure that Windows will install updates on its own as soon as they are available, turn on the automatic update feature. If you do not use automatic updates, you should search for updates at least once a week. Microsoft usually releases important updates on the second or fourth Tuesday in the given month. However, updates may be released at any time.

So, if you have automatic updates turned on then you are all set – well, almost. Certain updates require a system restart. If you do not restart the system after the update, the system will restart automatically. And this could be a problem, in particular if you did not set up programs that run after startup, and in certain cases you also need to set up automatic login.

Automatic system updates

Server security should be your first priority and therefore operating system updates should not be avoided. Immediately after installation, the system should display in the Server Manager under the Local Server, under Last installed updates with the value Newer.

Windows updates

This situation needs to be changed; therefore, click on Newer and in the next window on Check for updates.

Check for updates

This will initiate the update process, which usually needs to be completed with a restart.

Update process initiation

The server usually waits for the administrator to confirm the restart. However, it is possible to plan the restart after the update is completed and when the server is not active. Open the Settings window and under Windows Update scroll down to Update Status, where you will find the Change Active hours option.

Change Active hours

Here you may set a time interval when the server is busy and automatic restart is not allowed.

Time interval setting

Unfortunately, it is a common bad habit of server administrators to turn off automatic updates to make sure that the system will not restart automatically.

An unpatched system could be compared to an unguided missile!
It is highly recommended NOT to turn off automatic updates!

It is better to make sure that your server is able to put itself into the required status on its own, which may include automatic system login and configuration of programs that run after startup.

Automatic updates for MS Window Server 2008 R2

You will find automatic update settings in “Start menu>> Control Panel >> System and Security >> Windows Update >> Change settings”.

Windows updates 2

The default setting, which is also recommended, installs automatic updates each day at 3 a.m. – if there are any updates of course. You may also change this setting. It is up to you. You have four options to choose from.

Choose a proper option

Automatic Windows login settings

Mostly after a restart and based on system updates, you may appreciate the option to automatically log into Windows. Setting up automatic login is very easy. Go to the Taskbar and click on the Magnifying glass icon (Search)…

Click on the Taskbar and Search

… enter the following command “netplwiz” (without quotation marks) in the field, and confirm.

Write netplwiz

The system displays the User Accounts window, where you should uncheck Users must enter a user name and password to use this computer.

Uncheck an option Users...

Click on Apply

Click on the Apply

…the system will ask you to enter the user account password where the system will log in automatically. In our case we have only one account on the server called the Administrator; however, if you have several user accounts on the server, you may select any of them.

Enter user name and password

Confirm all settings by pressing the OK button. Now, after each restart the selected user will automatically log into Windows. Keep in mind that this setting directly impacts the security of your server!

Launching of programs after startup

You may find this setting useful when the automatic login feature is activated, but it is not necessary. There are other benefits as well. Open the Start menu and select Windows System and then Run.

Search for Run

Enter “shell:startup” (without quotation marks) into the newly opened Run window and confirm your selection.

Enter shell:starup

The system will open Windows Explorer in the Startup menu, which you can get to through a cumbersome path and through hidden files at “C:\\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup” (the path is valid for Administrator). In this folder you may use the context menu to create a program shortcut which you will launch after the operating system starts up, or you may simply drag-and-drop this shortcut to this folder either from the desktop or from the Start menu.

Create program shortcut

Now, every time you restart your server, the programs that you need will start, and you will no longer be unpleasantly surprised that your server is not working.

Author: Jirka Dvořák

Best articles

Cooling system with freecooling technology in the server room
dedicated server Dell in our portfolio
VPS and VDS with 50% reduction on the price