#18326 - 2002-03-06 10:42 PM
ScreenSaveTimeOut
|
Anonymous
Anonymous
Unregistered
|
I am trying to set the for the logon screen saver to automatically turn on. Currently I am using:
Writevalue("HKEY_CURRENT_USER\control panel\desktop","ScreenSaveTimeout","3600","reg_sz")
This does not seem to work. Does anyone have any ideas why.
I also using write values to set the password protect on and set the screen saver to logon. These all seem to work. I just CAN'T get the logon screen saver to work.
|
|
Top
|
|
|
|
#18327 - 2002-03-07 03:17 AM
Re: ScreenSaveTimeOut
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
$=writevalue("$HKCPCPD","ScreenSaveActive","1","REG_SZ") $=writevalue("$HKCPCPD","ScreenSaverIsSecure","1","REG_SZ") $=writevalue("$HKCPCPD","ScreenSaveTimeOut","1800","REG_SZ") $=writevalue("$HKCPCPD","ScrnSave.exe","%windir%\System32\Logon.scr","REG_SZ")
|
|
Top
|
|
|
|
#18328 - 2002-03-12 02:35 AM
Re: ScreenSaveTimeOut
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
We are using following code to influence screen saver settings. We have define two groups
- "ScreenSaverActive"
- "ScreenSaverSecure"
Also we influence the HKU/.Default. At least we are changing the default settings for specified screen saver. Following idea may give you ideas about implementation.
code:
$ikey="HKEY_CURRENT_USER\Control Panel\Desktop" IF (ExistKey($ikey) = 0) $ikey_ex="ScreenSaveTimeOut" $ivalue="300" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="ScreenSaveActive" IF (INGROUP("ScreenSaverActive") = 1) OR (INGROUP("ScreenSaverActive") = 2) OR (INGROUP("ScreenSaverSecure") = 1) OR (INGROUP("ScreenSaverSecure") = 2) $ivalue="1" ELSE $ivalue="0" ENDIF IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="ScreenSaverIsSecure" IF (INGROUP("ScreenSaverSecure") = 1) $ivalue="1" ELSE $ivalue="0" ENDIF IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="scrnsave.exe" $ivalue="c:\winnt\system32\ssmarque.scr" IF (LCASE(ReadValue($ikey, $ikey_ex)) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ENDIF ; $ikey="HKEY_USERS\.Default\Control Panel\Desktop" IF (ExistKey($ikey) = 0) $ikey_ex="ScreenSaveTimeOut" $ivalue="300" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="ScreenSaveActive" IF (INGROUP("ScreenSaverActive") = 1) OR (INGROUP("ScreenSaverActive") = 2) OR (INGROUP("ScreenSaverSecure") = 1) OR (INGROUP("ScreenSaverSecure") = 2) $ivalue="1" ELSE $ivalue="0" ENDIF IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="ScreenSaverIsSecure" IF (INGROUP("ScreenSaverSecure") = 1) $ivalue="1" ELSE $ivalue="0" ENDIF IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="scrnsave.exe" $ivalue="c:\winnt\system32\ssmarque.scr" IF (LCASE(ReadValue($ikey, $ikey_ex)) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ENDIF ; $ikey="HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee" IF (ExistKey($ikey) = 0) $ikey_ex="Attributes" $ivalue="00111" ; - random, cursive, fat - IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="Backgroundcolor" $ivalue="0 0 0" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="CharSet" $ivalue="0" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="Font" $ivalue="Times New Roman" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="Mode" $ivalue="1" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="Size" $ivalue="72" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="Speed" $ivalue="2" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="Text" $ivalue="Busy ..." IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ; $ikey_ex="TextColor" $ivalue="0 128 128" IF (ReadValue($ikey, $ikey_ex) <> $ivalue) IF (writevalue($ikey, $ikey_ex, $ivalue, "REG_SZ") <> 0) ENDIF ENDIF ENDIF
greetings.
|
|
Top
|
|
|
|
#18330 - 2002-07-08 05:24 PM
Re: ScreenSaveTimeOut
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
|
|
Top
|
|
|
|
#18331 - 2002-07-08 05:35 PM
Re: ScreenSaveTimeOut
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Can I ask why this topic was started with a poll?
Thanks,
Kent
|
|
Top
|
|
|
|
#18333 - 2002-07-08 05:41 PM
Re: ScreenSaveTimeOut
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
BTW,
This is covered in the FAQ Section, under the topic of Screensaver - Set one globally.
HTH,
Kent
|
|
Top
|
|
|
|
#18334 - 2002-07-08 05:44 PM
Re: ScreenSaveTimeOut
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
I voted for Screen Saver Reg Updated ... timeout didn't do it for me
|
|
Top
|
|
|
|
#18336 - 2002-07-08 06:05 PM
Re: ScreenSaveTimeOut
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
It won't work without the API toolkit. Do you have that installed?
Brian
(I tested on Windows 2000, but not Win 9x) [ 08 July 2002, 18:06: Message edited by: BrianTX ]
|
|
Top
|
|
|
|
#18338 - 2002-07-08 06:11 PM
Re: ScreenSaveTimeOut
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
lots of replies, but none from the poster...
|
|
Top
|
|
|
|
#18339 - 2002-07-08 06:22 PM
Re: ScreenSaveTimeOut
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
There might be a way to do this with rundll32 or WSH using the same concept as with the apitoolkit. I haven't looked into it, yet, though.
Brian
|
|
Top
|
|
|
|
#18340 - 2002-07-08 06:26 PM
Re: ScreenSaveTimeOut
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Will,
Thanks for the suggestion.. Added in an option to turn this on or off..
Thanks!
Kent
|
|
Top
|
|
|
|
#18341 - 2002-07-08 06:36 PM
Re: ScreenSaveTimeOut
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
has anyone tried making the settings via the reg, and then killing explorer.exe process.
That might cause the registry to be read again without needing to reboot for the change to take effect
|
|
Top
|
|
|
|
#18343 - 2002-07-08 07:25 PM
Re: ScreenSaveTimeOut
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
do you have webshots or a 3rd party app installed... I use the code that I posted at the beginning of this thread.
|
|
Top
|
|
|
|
#18344 - 2002-07-08 07:57 PM
Re: ScreenSaveTimeOut
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Ok.. I just downloaded a free C compiler.. is anyone interested in my incorporating the systemparametersinfo function into a commandline utility (compiled with LCC-win32)?
Brian
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 584 anonymous users online.
|
|
|