I did some additional searching and found that you could create lock.cmd: /wait logon.scr /s & rundll32 user32.dll,LockWorkStation /p # – Display a preview of the screensaver using the specified./c – Show the configuration settings dialog box.
scr with /s from Screensaver Sample Command Line Options: Note that I got the idea of just invoking the. scr that is actually installed in Windows 7.
scr is on the PATH the above command should work.ĮDIT: I don't know if Windows 7 comes with logon.scr, make sure you're testing it with a.
Does the following meet your requirements? start logon.scr /sĪs long as the.