|
#1
|
|||
|
|||
|
I would like to require my users to have screensavers AND to have them
password protected. But I want them free to choose the screensaver and free to set the timeout. I have already learned how to do most of this using the registry key (\HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop). If I set an entry in there for ScreenSaverIsSecure = 1, then I get almost all of what I want. But the user can defeat my design by selecting None as the screensaver to be used. Is there any way that I can remove or disable the "none" choice from the screensaver list while otherwise allowing users to choose the screensaver and timeout? Thanks for your help. Peter Smick |
|
#2
|
|||
|
|||
|
Try this, worked for me in similar situation, have adjusted to your
requirements, I think. opt ('trayiconhide',1) ; Run as background process. ; Set to suit your requirements: $DefSaver=@SystemDir & '\scrnsave.scr' $MaxDelay=100 do $HasSaver=1 $IsActive = RegRead('HKEY_CURRENT_USER\Control Panel\Desktop','ScreenSaveActive') $IsSecure = RegRead('HKEY_CURRENT_USER\Control Panel\Desktop','ScreenSaverIsSecure') $Timeout = RegRead('HKEY_CURRENT_USER\Control Panel\Desktop','ScreenSaveTimeout') $SaverFile = RegRead('HKEY_CURRENT_USER\Control Panel\Desktop','SCRNSAVE.EXE') if ($SaverFile="") OR (FileExists($SaverFile)=0) then RegWrite ( 'HKEY_CURRENT_USER\Control Panel\Desktop', 'SCRNSAVE.EXE', 'REG_SZ', $DefSaver ) $HasSaver=0 endif if $IsSecure = 0 then RegWrite ( 'HKEY_CURRENT_USER\Control Panel\Desktop', 'ScreenSaverIsSecure', 'REG_SZ', 1 ) $HasSaver=0 endif if $IsActive = 0 then RegWrite ( 'HKEY_CURRENT_USER\Control Panel\Desktop', 'ScreenSaveActive', 'REG_SZ', 1 ) $HasSaver=0 endif if $Timeout > $MaxDelay then RegWrite ( 'HKEY_CURRENT_USER\Control Panel\Desktop', 'ScreenSaveTimeout', 'REG_SZ', $MaxDelay ) $HasSaver=0 endif if $HasSaver=0 then if @OSTYPE = 'WIN32_NT' then Run(@SystemDir & "\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters") endif endif sleep(10 * 60 * 1000) ; Check every 10min. until 0; Stay resident Compile with AutoIt 3.0 or higher from http://www.autoitscript.com (Dont think this forum has a CODE option, so you might see a few wrapped lines that will need rejoining. ) |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| RE: Disable Screensaver WM10 | MarcMinbari | Windows Media Player | 1 | 01-05-2006 04:03 PM |
| Software Restriction Policies | Jakem Schott | Windows XP Security Admin | 1 | 01-05-2006 04:30 AM |
| Shutdown via Screensaver | BUR | Windows XP Security Admin | 8 | 01-05-2006 04:16 AM |
| Curious ScreenSaver behavior | PT | Windows XP New Users | 1 | 01-05-2006 03:59 AM |
| Screensaver Problems | Conwatcher | Windows XP New Users | 7 | 01-05-2006 02:59 AM |