Page 1 of 1

Trigger screensaver via batch file

Posted: Mon Aug 02, 2021 7:16 am
by marty.vdh
Is there a way the screen saver can be triggered via scripting, either as a batch file or VBS ?

When I call gPhotoShow.scr it is loading the configuration window rather than the screensaver itself.

Thanks,
Marty

Re: Trigger screensaver via batch file

Posted: Mon Aug 02, 2021 8:52 am
by gpb
Hello,
to run a screensaver you must add the /s parameter:
gPhotoShow.scr /s

this command will run gPhotoShow directly without locking the pc, to lock the pc and start the default screen saver you should send the message WM_SYSCOMMAND with wparam set to SC_SCREENSAVE to the desktop window:
https://docs.microsoft.com/en-us/window ... syscommand