Logoff Script Running but not Applying

  • Thread starter Thread starter nevets2001uk
  • Start date Start date
N

nevets2001uk

Guest
I have a weird problem with my logoff script that disables our proxy setting
in IE. The script runs because the popup dialog is displayed at logoff but
the proxy is enabled even when logging in outside of the domain.

However if I manually run the script it removes the settings which remains
unchecked when outside of the domain (as we would like to occur).

Scipts below...

LOGON SCRIPT


CODE
Option Explicit
On Error Resume Next

'DECLARE VARAIBLES
Dim objWshShell
Set objWshShell = CreateObject("WScript.Shell")

'<<<<< PROXY >>>>>>>

objWshShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ProxyEnable",1,"REG_DWORD"
objWshShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ProxyServer","ukproxy1.utc.com:8080"
objWshShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ProxyOverride","<local>"

Set objWshShell = Nothing

WScript.Quit

LOGOFF SCRIPT


CODE
Option Explicit
On Error Resume Next

'DECLARE VARAIBLES
Dim objWshShell
Set objWshShell = CreateObject("WScript.Shell")

'DISABLE PROXY
objWshShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ProxyEnable",0,"REG_DWORD"
objWshShell.Popup "Script",, "Script Complete", 48

Set objWshShell = Nothing
WScript.Quit

Is there something obvious I'm missing?
--

Cheers,
Steve Gordon
MCSE, MCSA: Messaging
 
Back
Top