Page 1 of 2 12>
Topic Options
#18326 - 2002-03-06 10:42 PM ScreenSaveTimeOut
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 Offline
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")
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#18328 - 2002-03-12 02:35 AM Re: ScreenSaveTimeOut
MCA Offline
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.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#18329 - 2002-07-08 04:48 PM Re: ScreenSaveTimeOut
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
The problem I am having with this is that when I set the screen saver to 900 seconds, it changes in the registry but the screen saver keeps the users default timeout before I changed it in the registry. Even after a reboot, it will not pick up the 15 minutes.
_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
#18330 - 2002-07-08 05:24 PM Re: ScreenSaveTimeOut
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
See this topic:

http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=2;t=003533

Brian

Top
#18331 - 2002-07-08 05:35 PM Re: ScreenSaveTimeOut
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Can I ask why this topic was started with a poll?

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#18332 - 2002-07-08 05:40 PM Re: ScreenSaveTimeOut
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Because the original poster is a 'Junior Member' and most likely hasn't either read the appropriate FAQ sections and/or just hit the wrong button.
_________________________
There are two types of vessels, submarines and targets.

Top
#18333 - 2002-07-08 05:41 PM Re: ScreenSaveTimeOut
Kdyer Offline
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
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#18334 - 2002-07-08 05:44 PM Re: ScreenSaveTimeOut
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I voted for Screen Saver Reg Updated ... timeout didn't do it for me [Big Grin]
Top
#18335 - 2002-07-08 06:03 PM Re: ScreenSaveTimeOut
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Brian,
I recieve an error on the API call that crashes the script.

Kyder
When running your script, it made the screen saver dissapear from the desktop properties and we do not want that.
_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
#18336 - 2002-07-08 06:05 PM Re: ScreenSaveTimeOut
BrianTX Offline
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
#18337 - 2002-07-08 06:10 PM Re: ScreenSaveTimeOut
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
no we do not have it installed on any of our machines. So that options is out. Thanks!
_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
#18338 - 2002-07-08 06:11 PM Re: ScreenSaveTimeOut
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
lots of replies, but none from the poster...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#18339 - 2002-07-08 06:22 PM Re: ScreenSaveTimeOut
BrianTX Offline
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 Offline
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
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#18341 - 2002-07-08 06:36 PM Re: ScreenSaveTimeOut
Radimus Moderator Offline
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
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#18342 - 2002-07-08 07:13 PM Re: ScreenSaveTimeOut
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Radimus,
I have even rebooted on a 2000 machine and the settings still stay at 10 minutes compared to the 15 minutes the registry says. We do not use group policies either. I am wondering what converts it from seconds to minutes in the Display settings. Is there a temporary place that holds the info and that needs changes too!
_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
#18343 - 2002-07-08 07:25 PM Re: ScreenSaveTimeOut
Radimus Moderator Offline
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.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#18344 - 2002-07-08 07:57 PM Re: ScreenSaveTimeOut
BrianTX Offline
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
#18345 - 2002-07-12 12:38 AM Re: ScreenSaveTimeOut
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Radimus,
That is the same code I am using. In your image, is the time already set to 15 minutes?
_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 583 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.071 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org