Jump to content
Sign in to follow this  
PcExpert

Change proxy settings on IE

Recommended Posts

PcExpert

Hi all,

How to change the proxy settings for IE7 on Windows Vista Bussines? it should be possible by writing to a registry key. But I cant find the right one. Could somebody please help me out?

Thanks!

Share this post


Link to post
Share on other sites
PcExpert

After spending some time on the internet, searching again for a solution. I finally got my script like this:

$key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
RegWrite($key, "ProxyEnabled", "REG_DWORD", "1")
RegWrite($key, "ProxyServer", "REG_SZ", "PROXY:PORT") 
RegWrite($key, "ProxyOverride", "REG_SZ", "<local>")

But when I run this, it doesnt change the proxy settings, and ofcourse I changed 'PROXY:PORT' to the proxy and port i'm using. Thanks!

Share this post


Link to post
Share on other sites
rudi

*BUMP*

1st of all: No experience with hasta la VISTA so far :)

I wrote a similar script for XP and IE6 usage. When writing directly to the Reg Values you mentioned, all instances of IE need to be closed, and the next one opened will take the changes.

What you would need is a "hello, all open IE windows, read again all IE settings!", what *does* happen, when you do the changes through the IE dialoges.

Regards, Rudi.

EnvUpdate() didn't help me, it's only updating env *within* au3 scripts...


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
DjDeep00

@PcExpert...So you are saying that after running your script with the regwrites the registry did Not get updated?...If so then you should look a the return codes for the regwrites and most likely they all return an error. Look in the helpfile for the different error codes. Since Vista has all the crazy security....you might not have any permissions to change the registry.

Share this post


Link to post
Share on other sites
PcExpert

I have full admin rights on the system.

Error: unable to open requested key

So I thought I lacked the rights for that key, so I changed permissions on that key to have full control. But that didnt solve it :).

This is my script:

#RequireAdmin
$key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$reg = RegWrite($key, "ProxyEnabled", "REG_DWORD", "1")
MsgBox(0, "", $reg)
$reg1 = RegWrite($key, "ProxyServer", "REG_SZ", "PROXY:PORT") 
MsgBox(0, "", $reg1)
$reg2 = RegWrite($key, "ProxyOverride", "REG_SZ", "<local>")
MsgBox(0, "", $reg2)

I hope someone will be able to help me out. Thanks!

Edited by PcExpert

Share this post


Link to post
Share on other sites
Markos

If you have 64-bit version of vista and running 32-bit version of autoit you are probably getting redirected to key:

HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings

check the key and if there are your values its the problem, to fix that run 64-bit version of autoit


Share this post


Link to post
Share on other sites
PcExpert

I'm using the 32 bit version :)

Share this post


Link to post
Share on other sites
DjDeep00

@PcExpert...Can you try reading the values?

$Read_It = RegRead ( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer" )
MsgBox(0,"", $Read_It)

Also...I see that you have the incorrect key name...

RegWrite($key, "ProxyEnabled", "REG_DWORD", "1")

It should be:

RegWrite($key, "ProxyEnable", "REG_DWORD", "1")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×