Page 1 of 1 1
Topic Options
#120286 - 2004-05-27 10:53 AM screen saver
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
To place a specific screen saver for all our users, I will change the value of the following reg key (through the login script):
HKEY_CURRENT_USER\Control Panel\Desktop
SCRNSAVE.EXE= C:\WINDOWS\Showtime Boxing Screensaver.scr

Which key I should edit to change the timeo ut of screen saver (minutes to wait before activate the screen saver) ?
I have tried to change time in the following kye
But it did not work :
HKEY_CURRENT_USER\Control Panel\Desktop

Thank you.

Top
#120287 - 2004-05-27 11:03 AM Re: screen saver
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, looking at my logonscript:
Code:

function SecureScreenSaver()
dim $loc,$
$loc="HKEY_CURRENT_USER\Control Panel\Desktop"
$=writevalue($loc,"ScreenSaverIsSecure","1","REG_SZ")
$=writevalue($loc,"ScreenSaveActive","1","REG_SZ")
$=writevalue($loc,"ScreenSaveTimeOut","1800","REG_SZ")
if not len(readvalue($loc,"SCRNSAVE.EXE"))
$=writevalue($loc,"SCRNSAVE.EXE","%windir%\system32\logon.scr","REG_SZ")
endif
endfunction

_________________________
!

download KiXnet

Top
#120288 - 2004-05-27 01:36 PM Re: screen saver
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Thank you Lonkero for your support but I am still encountering a strange problem.
Entering the new screen saver file name into: HKEY_CURRENT_USER\Control Panel\Desktop
SCRNSAVE.EXE working fine but the problem is with entering the waiting time “ScreenSaveTimeOut” because the new value (e.i 180) entered to this key appeared to me when I check regedit but does not act.

For example I entered 180 to this key but I found that the BC waiting only 60 seconds then activate the screen saver.

In the screen saver GUI I found that selected screen saver & time out (1 minute) are not active (gray).

Why it insist to make the time out value 1 minute although I have changed it? Thank you.

Top
#120289 - 2004-05-27 02:15 PM Re: screen saver
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
obviously, this is user setting.
if you don't kill explorer or something, the change happens on next logon.
as you can understand, windows does not read the reg in vain (which would produce overheat) but only checks it during startup and writes only when setting.
otherwise, it's in memory and if you can't tell windows to reload the setting, it will insist using the memory value.
_________________________
!

download KiXnet

Top
#120290 - 2004-05-27 06:07 PM Re: screen saver
The Chef Offline
Fresh Scripter

Registered: 2003-01-08
Posts: 23
Loc: New Jersey
IMHO it should take effect immediately.. Just as if you are changing it from the GUI. What OS are you using? Certain SS configs are in different places in XP. The screensaver may have its own timeout property, rather than an explorer shell timeout property(but I doubt it). Try looking under HKCU\Software\**Vendor** tree. Search the registry for any keys specific to that screensaver to make sure you are finding all the keys. Here is what I use for Microsoft specific screensavers (specifically the 3d flying objects SS):

Code:
  
$ProductName = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName")


WriteValue ("HKEY_CURRENT_USER\Control Panel\Desktop","SCRNSAVE.EXE", "%SYSTEMROOT%\system32\ss3dfo.scr","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveTimeOut","600","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveActive", "1","REG_SZ") ; <- Make screensaver active
WriteValue ("HKEY_USERS\.DEFAULT\Control Panel\Desktop","ScreenSaveActive", "1","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaverIsSecure","1","REG_SZ")

Select

Case $ProductName = "Microsoft Windows 2000"
WriteValue ("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DFlyingObj","Options","1","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DFlyingObj","Size","100","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DFlyingObj","Tesselation","200","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DFlyingObj","Texture","%SYSTEMROOT%\OtherOrg.BMP","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DFlyingObj","TextureFileOffset","11","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DFlyingObj","Type","6","REG_SZ")


Case $ProductName = "Microsoft Windows XP"
WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Flying Objects","Options","1","REG_DWORD")
WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Flying Objects","Size","100","REG_DWORD")
WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Flying Objects","Tesselation","200","REG_DWORD")
WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Flying Objects","Texture","%SYSTEMROOT%\OtherOrg.BMP","REG_SZ")
WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Flying Objects","TextureFileOffset","11","REG_DWORD")
WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Flying Objects","Type","6","REG_DWORD")

Case 1
? "Could not determine OS type.. screensaver not configured.."


EndSelect


Top
#120291 - 2004-05-27 06:17 PM Re: screen saver
The Chef Offline
Fresh Scripter

Registered: 2003-01-08
Posts: 23
Loc: New Jersey
Just thought of something else.. on whatever system you are using, install regmon, then change the screensaver timeout property from the GUI, and watch which key it changes from regmon. You will have to filter things down in regmon to avoid looking at thousands of entries, but it may point you in the right direction..
Top
#120292 - 2004-05-27 07:25 PM Re: screen saver
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
See if this thread will help: Applying Registry Settings
_________________________
(... better days ahead)

Top
#120293 - 2004-05-27 07:29 PM Re: screen saver
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Pesonally, I really abhor any aspect of centrally managing users' desktops. We do lock down some desktops but we build it into the image, not deploy through logon script.

The other thing that really bugs me is when people insist on using reg hacks when GPOs are available to do the same thing.

That said, I would have to agree with Lonk, that hacking it through the reg would not effect an immediate change. I just wonder though, if the SetWallpaper() function would not force a refresh of the SS.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#120294 - 2004-05-27 07:29 PM Re: screen saver
The Chef Offline
Fresh Scripter

Registered: 2003-01-08
Posts: 23
Loc: New Jersey
Yep, Lonkero is right...again.
Top
#120295 - 2004-05-27 09:25 PM Re: screen saver
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ofcourse I am.
_________________________
!

download KiXnet

Top
#120296 - 2004-05-28 05:38 AM Re: screen saver
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Take a look at the UpdateUserParameters() UDF in the UDF Forum.
_________________________
There are two types of vessels, submarines and targets.

Top
#120297 - 2004-06-23 06:17 PM Re: screen saver
dmarussi Offline
Fresh Scripter

Registered: 2004-05-11
Posts: 15
i have to agree with lonkero on this one. i have this same setup. upon first login it changes the type of screensaver you have specified, the amount of time doesn't actually change until the next logon. i guess it writes to the reg the first time around but doesn't actually take effect until the next...
Top
Page 1 of 1 1


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

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.066 seconds in which 0.029 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