Does the following meet the requirements?
start logon.scr /s
While .scr is in PATH, this command should work.
EDIT: I don't know if Windows 7 logon.scr with logon.scr , make sure you test it with .scr , which is actually installed on Windows 7.
Note that it occurred to me to simply call .scr using /s from the Command line options for a sample screen :
When Windows launches your splash screen, it launches it using one of the three Line Parameters commands:
- / s - Launch a screen saver in full screen mode.
- / c - Show configuration options dialog box.
- / p #### - display a preview of the splash screen using the specified window handle.
EDIT 2:
I did a few additional searches and found that you can create lock.cmd :
@start /wait logon.scr /s & rundll32 user32.dll,LockWorkStation
Or lock.vbs :
Set objShell = CreateObject("Wscript.Shell") ' The "True" argument will make the script wait for the screensaver to exit returnVal = objShell.Run("logon.scr", 1, True) ' Then call the lock functionality objShell.Run "rundll32.exe user32.dll,LockWorkStation"
None of these answers are ideal, both show the flickering of the desktop after the screen saver is turned off and immediately before the workstation locks.
Cannot reproduce the system behavior of the startup screen saver and password protection when resuming. Even the answer to Starting System Screensaver from C # Windows Form launches a screen saver, it does not password protect when resuming.
Grant wagner
source share