Trying to make .BAT to start screensaver and lock screen Win 7 pro 64


  1. Posts : 18
    Windows 7 Professional 64bit
       #1

    Trying to make .BAT to start screensaver and lock screen Win 7 pro 64


    I am trying to make a shortcut to lock my screen and invoke the screensaver with one batch file.

    I came up with this:

    @echo off
    rem ScreenSaver
    cd %windir%\
    start WLXPGSS.SCR
    rem LOCK
    cd %windir%\system32
    start rundll32.exe user32.dll,LockWorkStation
    exit


    With this batch file, the screen locks (need to put in my password) but the screen saver doesn't start.
    Upon entering my password, I see the settings for that particular screensaver were called for not the actual screensaver.

    However, when I run C:\Windows\WLXPGSS.SCR the screensaver plays but doesn't "Show welcome screen" and password prompt as selected in the screen saver properties.

    I want to click one batch file to lock the screen and play that screensaver only.

    That screensaver, by the way, seems it's only part of "Windows Live Setup" which needs to be downloaded from here ...possibly not on all Windows 7 computers.
    File Name: wlsetup-web.exe

    Here is what is included with Windows Live Setup...you can choose only what you want at install time.

    Anyone have any ideas?

    Thanks

    Last edited by voiceartistusa; 12 Mar 2013 at 20:51. Reason: Typo...oops
      My Computer


  2. Posts : 881
    Windows 7 Ultimate x64
       #2

    I'm guessing it is running the screensaver then locking the PC losing the screensaver.

    If you switch the order does the screensaver part still run?
      My Computer


  3. Posts : 18
    Windows 7 Professional 64bit
    Thread Starter
       #3

    By switching the order like this

    @echo off
    rem LOCK
    cd %windir%\system32
    start rundll32.exe user32.dll,LockWorkStation
    rem ScreenSaver
    cd %windir%\
    start WLXPGSS.SCR
    exit


    Same thing, I see the welcome screen, then I type in my password and I see the settings for that screensaver.

    I even tried this...same results.

    @echo off
    rem LOCK
    cd %windir%\system32
    start rundll32.exe user32.dll,LockWorkStation
    rem ScreenSaver
    cd %windir%\WLXPGSS.SCR
    start WLXPGSS.SCR
    exit

      My Computer


  4. Posts : 186
    Windows 7 Professional 32bit SP1, Windows 10 Home 64-bit at the moment
       #4

    Many years ago we I used Windows XP at work if you left you computer for a while you had to log off. When you came back you had to login again and wait for everything to establish itself this is a bit time consuming.

    I made an app in VB that you could run and the screen would be locked so no one could use my computer. You type in a password and it unlocks, it also have one of the Windows screensavers that activated after a while. When we changed over to Windows 7 it still worked.
      My Computer


  5. Posts : 1
    Win 7 Enterprise x64
       #5

    Try this


    Try:
    start WLXPGSS.SCR /start
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:09.
Find Us