jeffsu28 Posted January 3, 2005 Posted January 3, 2005 Is there any way via vbscript or batch file or even editing the registry to have the screensaver run and also lock the computer when I initiate it. I tried creating a shortcut to the screensaver but that just runs the screensaver and the computer is not locked. I created a shortcut that uses the rundll32 user32,LockWorkStation but that only locks the computer. I am for 1 thing that can do both. Any ideas? Thanks...
oioldman Posted January 3, 2005 Posted January 3, 2005 You can do this, i did, but found that i couldn't get the station to unlock so removed the reg keys.I used regsnap to note reg changes, but recall them being in HKCU\control panel\desktop
maxXPsoft Posted January 3, 2005 Posted January 3, 2005 (edited) If you have "On Resume Password Protect" enabled and just hit the Windows key and LSimplest thing I found. It instantly goes to logon screen so whatever you had running ius hidden if you need quickness. [HKEY_CURRENT_USER\Control Panel\Desktop]"ScreenSaverIsSecure"="1"BTW it depends on timeout for the screensaver to start when its sitting there. Edited January 3, 2005 by maxXPsoft
maxXPsoft Posted January 3, 2005 Posted January 3, 2005 (edited) You could set your screensaver timeout to 1 minute. But that would mess with you severely Edited January 3, 2005 by maxXPsoft
jdbrisel Posted October 11, 2006 Posted October 11, 2006 (edited) Try this vb script:Set objShell = CreateObject( "Wscript.Shell" )' The "True" argument will make the script wait for the screensaver to exitreturnVal = objShell.Run( "%windir%\System32\ssmypics.scr" , 1, True)' Then call the lock functionalityobjShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation" Edited October 11, 2006 by jdbrisel
davidhoff Posted September 28, 2007 Posted September 28, 2007 Try this vb script:Set objShell = CreateObject( "Wscript.Shell" )' The "True" argument will make the script wait for the screensaver to exitreturnVal = objShell.Run( "%windir%\System32\ssmypics.scr" , 1, True)' Then call the lock functionalityobjShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"Simply but perfect. Thanks a lot.PS=Why it's useful? Because I can set my defrag util to start on screensaver...@D!
bflmpsvz Posted February 28, 2008 Posted February 28, 2008 (edited) Try this vb script:Set objShell = CreateObject( "Wscript.Shell" )........objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"Simply but perfect. Thanks a lot. I do not like this solution, it does not help me. Because if the workstation is "locked" this way, any scheduler trying to set the computer to Stand-by state simply fails (using rundll32 powrprof.dll,SetSuspendState ). The running vb script probably blocks it, so only when one logs in, the computer goes to Stand-by immediatelly .Solution I use at last is based on simple application http://www.jsifaq.com/SF/Tips/Tip.aspx?id=0302 . It simply runs screensaver which is set in Display Properties - Screen saver , but it could be done from ordinary .bat file. Batch file ends and you have the same situation, as if you locked workstation and waited for set time. So my batch looks like this:%windir%\System32\rundll32.exe user32.dll,LockWorkStation "C:\util\savescrn.exe"Now I can run it, comp is immediatelly locked with running screensaver. Lately, scheduler runs VLC, records some on-line multicast session and sets the comp to Stand-by or Hibernate (or Turn off). I am fully satisfied. 11.4.2008:And, because screensaver does not save LCD panels too much, I use this batch:c:\util\nircmd.exe monitor off%windir%\System32\rundll32.exe user32.dll,LockWorkStation See http://www.nirsoft.net/utils/nircmd2.html - handy small command line utility. Again, it does not block the computer to go to Stand-by. Edited April 11, 2008 by bflmpsvz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now