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:
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.