Jump to content

Featured Replies

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...