mbouchard Posted October 6, 2005 Share Posted October 6, 2005 (edited) BAH, found my error, logon.scr not login.scr Missed it in a side by side comparison. I am working on a script that will enable a screensaver yet am running into an issue were it is not turning on. The code is going to be part of a larger script that will be used in a Kiosk we are setting up. The main script will depend on a screensaver being enabled to measure idle time, and will reset IE when the screensaver is turned off. That being said, I want to make sure that a screensaver is in fact enabled and that it isn't password protected. $strKeyPath = "HKCU\Control Panel\Desktop" ;Set value of ScreenSaveActive if not 1 (1=Active 0=inactive) If RegRead($strKeyPath, "ScreenSaveActive") <> 1 then RegWrite($strKeyPath, "ScreenSaveActive","Reg_SZ","1"); EndIf ;Set value of ScreenSaveIsSecure if not 0 (1=Requires password 0=does not require password) If RegRead($strKeyPath, "ScreenSaveIsSecure") <> 0 then RegWrite($strKeyPath, "ScreenSaveIsSecure","Reg_SZ","0"); EndIf $SSVal = RegRead($strKeyPath, "ScrnSave.exe");Check if ScrnSave.exe value is present. If @error = "-1" OR @error = "1" then ;If the value not present, set it to equal login.scr RegWrite($strKeyPath, "SCRNSAVE.EXE","Reg_SZ",@SystemDir & "\logon.scr"); ;Reboot if key set. ; Shutdown ( 0 ) EndIf For some reason, while it looks the same as if you enabled the screensaver using the Screen Saver tab in display properties, it isn't. After running the above script, the SCRNSAVE.exe is present in the registry but not showing up in display properties, even after a reboot. I used InstallRite to check for changes between my script the the GUI interface and the only key that was changed was the SCRNSAVE.exe and they looked identical to me. Does anyone have any ideas? Thanks, Mike Edited October 6, 2005 by mbouchard Link to comment Share on other sites More sharing options...
seandisanti Posted October 6, 2005 Share Posted October 6, 2005 BAH, found my error, logon.scr not login.scr Missed it in a side by side comparison.I am working on a script that will enable a screensaver yet am running into an issue were it is not turning on.The code is going to be part of a larger script that will be used in a Kiosk we are setting up. The main script will depend on a screensaver being enabled to measure idle time, and will reset IE when the screensaver is turned off.That being said, I want to make sure that a screensaver is in fact enabled and that it isn't password protected.$strKeyPath = "HKCU\Control Panel\Desktop" ;Set value of ScreenSaveActive if not 1 (1=Active 0=inactive) If RegRead($strKeyPath, "ScreenSaveActive") <> 1 then RegWrite($strKeyPath, "ScreenSaveActive","Reg_SZ","1"); EndIf ;Set value of ScreenSaveIsSecure if not 0 (1=Requires password 0=does not require password) If RegRead($strKeyPath, "ScreenSaveIsSecure") <> 0 then RegWrite($strKeyPath, "ScreenSaveIsSecure","Reg_SZ","0"); EndIf $SSVal = RegRead($strKeyPath, "ScrnSave.exe");Check if ScrnSave.exe value is present. If @error = "-1" OR @error = "1" then ;If the value not present, set it to equal login.scr RegWrite($strKeyPath, "SCRNSAVE.EXE","Reg_SZ",@SystemDir & "\logon.scr"); ;Reboot if key set. ; Shutdown ( 0 ) EndIfFor some reason, while it looks the same as if you enabled the screensaver using the Screen Saver tab in display properties, it isn't. After running the above script, the SCRNSAVE.exe is present in the registry but not showing up in display properties, even after a reboot. I used InstallRite to check for changes between my script the the GUI interface and the only key that was changed was the SCRNSAVE.exe and they looked identical to me.Does anyone have any ideas?Thanks,Mike"ScreenSaveIsSecure" <> "ScreenSaverIsSecure" Link to comment Share on other sites More sharing options...
mbouchard Posted October 6, 2005 Author Share Posted October 6, 2005 "ScreenSaveIsSecure" <> "ScreenSaverIsSecure"Bah, thanks. Link to comment Share on other sites More sharing options...
seandisanti Posted October 6, 2005 Share Posted October 6, 2005 Bah, thanks.np glad i could help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now