Try this vb script: Set objShell = CreateObject( "Wscript.Shell" ) ' The "True" argument will make the script wait for the screensaver to exit returnVal = objShell.Run( "%windir%\System32\ssmypics.scr" , 1, True) ' Then call the lock functionality objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"