Script to change proxy and release/renew IP?

osaddictosaddict London, UK
edited July 2007 in Science & Tech
As part of our 'disaster recovery plan' @ work sometimes we need to switch connections - this involves moving to a shared connection, and bypassing our server... as such we need all the clients to have new IPs - at present done manually with /release /renew ipconfig in cmd.

Firstly I wanted to write something to automate this - my very limited knowledge of 'scripting' tells me this would be a simplistic batch script.

Secondly - Internet Explorer and Firefox are both configured to use proxy's too.

So.. is there any way to remove the proxy in IE - this is the important case as outlook and other windows things rely on this setting...

Doing this and the ipconfig together would obviously be ideal, but if it was a 2 stage process it would be ok...

Anyone got any ideas?

Comments

  • ThraxThrax 🐌 Austin, TX Icrontian
    edited July 2007
    You must edit disable_proxy.reg and enable_proxy.reg in notepad. Please replace the "YOUR PROXY HERE" line with the IP or resolved name of your proxy. Place all four files together (In the system32 folder), so you can go to:

    start - run -> disable_proxy

    And you will have your proxy disabled, and your IP released/renewed. Proxy enabled, IP released/renewed with enable_proxy.
  • osaddictosaddict London, UK
    edited July 2007
    Thanks Thrax, I was looking at it last night and managed to create two reg files which would either enable and use proxy xxx or disable proxy - the only caveat I could find was that IE needed to be closed for it to function - i.e. close ie, run reg file to remove proxy - open ie proxy is removed, and the opposite.

    For some reason yours did this the first time but then when I ran it again it worked with IE open, oddness!

    Thanks thrax - that seems to do the job :)

    Fingers crossed it wont get much use - if it does it means our Internet connections knackered!
  • ShortyShorty Manchester, UK Icrontian
    edited July 2007
Sign In or Register to comment.