Re: Group policy screensaver - turn it off!



Where I work you can't even open the registry with the policy they have set,
but they can't block you from deleting the keys. The only problem I see with
this solution is every time the policy is implemented the script would need
to be re-run or it could be part of the Excel macro.

"NickHK" wrote:

Ralph,
Unless I'm missing something, if the group policy bars the OP from changing
the settings manually, how will the OP have permission to those keys ?

NickHK

"Ralph" <Ralph@xxxxxxxxxxxxxxxxxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:9C891347-4C7A-4049-9627-6CD581AFD4F0@xxxxxxxxxxxxxxxx
Create a vb script with the following:

Option Explicit
Dim WSHShell, regVal

Set WSHShell = WScript.CreateObject("WScript.Shell")

regVal = "HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop\"
regVal=regVal & "ScreenSaveTimeOut"
WSHShell.RegDelete regVal

regVal = "HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop\"
regVal=regVal & "ScreenSaverIsSecure"
WSHShell.RegDelete regVal

Set WSHShell=Nothing


"chris_culley@xxxxxxxxx" wrote:

Actually, I've just tried that code and it didn't work! Any other
ideas?

Cheers,

Chris




On Jun 5, 6:51 pm, chris_cul...@xxxxxxxxx wrote:
Hi,

I have a rather restricitve group policy set on my machine. I look
after a monte carlo simulation model, written in VBA, which annoying
breaks whenever the screensaver kicks in. They won't let me turn the
screensaver off. I have tried.

I have the following programming tools available:

1. VBA
2. Python compiler

and, er, that's it...

Does anyone know any vba hacks (or at a stretch a python hack) which
could stop my screensaver locking every 15 minutes, breaking my model?

I don't care how it does it - simulate a mouse movement, type a key,
turn the screensaver off... anything - it's becoming desperate!

I found the following in this newsgroup, but not sure it would work
with a group policy screensaver (Don Bardner, original author)...

Private Declare Function SystemParametersInfo Lib "user32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long,
_
lpvParam As Any, ByVal fuWinIni As Long) As Long

Sub SetScreenSaver(OnOff As Long)
'From Don Bradner
Dim templong As Long
Const SPI_SETSCREENSAVEACTIVE = 17
Const SPIF_UPDATEINIFILE = 1
Const SPIF_SENDWININICHANGE = 2
templong = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, OnOff,
ByVal
0&, _
SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub

Sub MySub()
SetScreenSaver 0
'your code here
SetScreenSaver 1
End Sub






.



Relevant Pages

  • Re: Task Scheduler
    ... This policy removes the Add Scheduled Task item that starts the New Task ... Prevents users from deleting tasks from the Scheduled Tasks folder. ... Windows Registry Editor Version 5.00 ... Selecting Merge will create the keys and Task Creation and Task Deletion ...
    (microsoft.public.windowsxp.configuration_manage)
  • Re: Apache Software Foundation Server compromised, resecured. (fwd)
    ... >> to selectively forward keys to hosts, or express policy regarding whether ... >> keys are then forwarded by the host you have connected to. ... My biggest complaint with ssh is the way ...
    (FreeBSD-Security)
  • Re: Bug with Office GP - Disable Hyperlink Warning?
    ... keys, not the policies. ... Best regards, ... Vincent Xu ... It appears that the policy is not applied to client succesfully. ...
    (microsoft.public.windows.group_policy)
  • Re: ADM Datei erstellen, nur wie?
    ... Wieso bleibt in der Gruppenrichtlinie die Kategorie lerr, ... Microsoft hat vier Keys in Windows implementiert, die beim Löschen einer Policy wieder zurückgesetzt werden, sollte die Policy gelöscht werden. ... Diese Keys sind: ... der Group Policy Editor zeigt dir standardmäßig nur Policies an - keine Preferences. ...
    (microsoft.public.de.german.win2000.gruppen_richtlinien)
  • Re: Group policy screensaver - turn it off!
    ... how will the OP have permission to those keys? ... I have a rather restricitve group policy set on my machine. ... breaks whenever the screensaver kicks in. ... Const SPI_SETSCREENSAVEACTIVE = 17 ...
    (microsoft.public.excel.programming)