Existing methods to lock the desktop after auto logon just call the LockWorkStation function through rundll32.exe via some shortcut placed in Start Up or registry. That takes a while to lock depending on how bloated your Windows is and till then it just sits on the desktop. And Safe Mode doesn't get locked since the start up items don't run in Safe Mode. More importantly using rundll32.exe for these functions causes a stack corruption which will eventually crash the system or worse.
So I made a replacement shell (Windows starts lock.exe instead of Explorer) which locks first and then launches Explorer in the background. It also handles Safe Mode and Safe Mode with Command Prompt and detects and launches the x64 cmd.exe on an x64 system. Auto Logon & Lock v1.0