Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proxy Settings

Status
Not open for further replies.

nevets2001uk

IS-IT--Management
Jun 26, 2002
609
GB
Is there any easy way to apply proxy settings to IE for all PCs and laptops connected to our domain but also have it remove the proxy setting for laptops when they shutdown so that when they connect to home broadband they can access the Internet?

Steve G (MCSE / MCSA:Messaging)
 
I suppose a logoff script [search google for disable proxy] or a little program I install to laptops [qroxy]

Code:
on error resume next
Dim WshShell, WshEnv
Const OverwriteExisting = True

'Configures Variables
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
set WshEnv = WshShell.Environment("Process")
SysDrive = WshEnv("%SYSTEMDRIVE%")
SysRoot = WshEnv("SYSTEMROOT")


source = "\\server\share$\qroxy\*.*" 
dest = SysDrive & "\Program Files\qroxy\"

If objFSO.FolderExists(dest) Then
  Set objFolder = objFSO.GetFolder(dest)
Else
  Set objFolder = objFSO.CreateFolder(dest)
End If

objFSO.CopyFile  Source  , Dest  , OverwriteExisting = true

WshShell.Regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\qroxy", "C:\Program Files\qroxy\qroxy.exe", "REG_SZ"

'Clears cache
set fso = nothing
set WshShell = nothing
set WshEnv = nothing
wscript.quit
 
Although I have never tried it myself, isn't it possible to setup a WPAD (Windows proxy auto discovery) user class in DHCP which will allow your users to automatically receive this entry. Since laptop users will connect to home networks for instance, the setting should disappear next time they obtain an IP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top