Force autologon after logging off

This isn’t strictly SharePoint-related, but might be useful to a sysadmin somewhere…

I have a few servers that are running old-fashioned console apps (meaning that there always has to be a specific user session logged in for these apps to run properly). The server is configured with an autologon feature so when the system is restarted (after patching or a power outtage), the apps are also automatically restarted.
Sometimes these apps will stop responding, and we need to restart them using a script; however, we don’t want to restart the entire server.
The problem I ran into was, if you just log off the user session, it doesn’t automatically log back in – it gets stuck on the username/password screen.

It turns out, there is a registry setting that controls this behavior. Here it is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ForceAutoLogon

This is a string value; if you set it to 1 (and configure the remaining registry values for auto-logon), then when you log off, Windows will log you right back in.

0 Responses to “Force autologon after logging off”



  1. No Comments Yet

Leave a Reply




Archives

RSS Ben Curry’s Blog

  • Upgrading to SharePoint Server 2010 November 3, 2009
  • SharePoint Server 2010 Site Directory (where did it go?) October 29, 2009

Blog Stats

  • 3,115 hits