Bypass or disable proxy based on computer name

internet explorermdt-2010PROXY

We are trying to deploy a bunch of new Windows 7 (and some old XP) machines using MDT2010 and MDT2012.

Because IE is set to "automatically detect proxy settings", it gets the settings from the proxy.pac/wpad.dat defined in the DHCP server.

The problem is that during deployment, the machine is not on the domain, so no authentication to the WebMarshal server is possible, so all internet-based operations fail unless someone "hands-on" fills in the authentication dialog box.

How can I do one of the following?

  1. Disable auto proxy configuration for XP before the application installations begin
  2. Have the proxy.pac/wpad.dat files bypass the proxy based on something identifiable on the machine (host name would do, but iirc that's not available to PAC, but any other variable I can set from MDT would do too)
  3. Configure WebMarshal to bypass authentication for particular a computer name

Best Answer

This is what I use (a vbs I found):

DIM sKey,sValue,binaryVal
Dim oReg
Dim status
Set oReg=GetObject( "winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")    'For registry operations througout

Const HKCU=&H80000001

status = "off"
sKey = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections"
sValue = "DefaultConnectionSettings"

oReg.GetBinaryValue HKCU, sKey, sValue, binaryVal

select case lcase(status)
  case "on"    binaryVal(8) = binaryVal(8) OR 8        'Force Autodetect on
  case "off"    binaryVal(8) = binaryVal(8) XOR 8        'Force Autodetect off
  case "show"    wscript.echo "Automatically detect is set to " & ((binaryVal(8) and 8) = 8)
  case else    wscript.echo "Invalid parameter - IEautomaticallydetect  on, off or show"
end select

if lcase(status)="on" or lcase(status)="off" then oReg.SetBinaryValue HKCU, sKey, sValue, binaryVal

Works flawlessly for me, I call it from a .cmd