Announcement

Collapse
No announcement yet.

Configure proxy in Internet Explorer on just single click.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configure proxy in Internet Explorer on just single click.

    Hi Allz,

    We know that we can change LAN configuration using netsh.exe command on just single click. I want to change the proxy settings in Internet Explorer using the netsh.exe or any other software on just single click. Do anyone have any idea???

  • #2
    Re: Configure proxy in Internet Explorer on just single click.

    Without more info it's difficult to decide wat you are trying to acheive.

    I don't know of any command line programs which will change proxy settings but it's easy to script.

    Code:
    Const HKEY_CURRENT_USER = &H80000001
    
    strComputer = "."
     
    Set ScriptMe=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ 
        strComputer & "\root\default:StdRegProv")
     
    strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
     
    strValueName = "ProxyEnable"
    dwValue = 1
    ScriptMe.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
    
    strValueName = "ProxyServer"
    stValue = "http=192.168.1.1:8080;https=192.168.1.1:8080"
    ScriptMe.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,stValue
    The above will enable ProxyServer and set server value to 192.168.1.1 on 8080 for HTTP and HTTPS

    (Just copy code and save as VBS, can be incorporated in a login script).

    topper
    * Shamelessly mentioning "Don't forget to add reputation!"

    Comment


    • #3
      set bypass address and home page ?

      thanks sir, i have used ur said script, it is working fine, one thing more in it that i want to add bypass address, how?
      2nd i also want to set home page of my explorer via script or modifying above script, how?
      Last edited by alitoday; 10th May 2007, 09:05. Reason: need more info

      Comment


      • #4
        Re: Configure proxy in Internet Explorer on just single click.

        Code:
        Const HKEY_CURRENT_USER = &H80000001
        Const HKEY_LOCAL_MACHINE = &H80000002
        
        strComputer = "."
         
        Set ScriptMe=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ 
            strComputer & "\root\default:StdRegProv")
         
        strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
        strKeyPath1 = "Software\Microsoft\Internet Explorer\Main"
        
        strValueName = "ProxyEnable"
        dwValue = 1
        ScriptMe.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
        
        strValueName = "ProxyServer"
        stValue = "http=192.168.1.1:8080;https=192.168.1.1:8080"
        ScriptMe.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,stValue
        
        strValueName = "ProxyOverride"
        stValue = "www.google.co.uk;<local>"
        ScriptMe.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,stValue
        
        strValueName = "Default_Page_URL"
        stValue = "http://www.google.co.uk"
        ScriptMe.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strValueName,stValue
        * Shamelessly mentioning "Don't forget to add reputation!"

        Comment


        • #5
          Re: Configure proxy in Internet Explorer on just single click.

          strValueName = "Default_Page_URL"
          stValue = "http://www.google.co.uk"
          ScriptMe.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strValueName,stValu e

          above settings is not working in ur mentioned script

          Comment

          Working...
          X