Put this in a batch file and put it in the startup group %windir%\system32\rundll32.exe user32.dll,LockWorkStation