Sign in to follow this  
Followers 0
Piyush

Changing IE proxy settings...

4 posts in this topic

How to change the proxy settings of internet explorer....with autoit...Thanks..


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites



One way is with WMI:

GetProxySetting()
SetProxySetting("someproxy.com",8080) 

Func SetProxySetting($myProxyServer , $myProxyPort)
$winmgmts = ObjGet("winmgmts:{impersonationLevel=impersonate}")
$win32_Proxy = $winmgmts.InstancesOf ("win32_Proxy")
Dim $Array[1]
for $Obj in $win32_Proxy
$result = $Obj.SetProxySetting($myProxyServer,$myProxyPort)
$Array[UBound($Array) - 1] = $result
ReDim $Array[UBound($Array) + 1]
next
ReDim $Array[UBound($Array) - 1]
Return $Array
EndFunc

Func GetProxySetting()
$winmgmts = ObjGet("winmgmts:{impersonationLevel=impersonate}")
$win32_Proxy = $winmgmts.InstancesOf ("win32_Proxy")
Dim $Array[1][2]
for $Obj in $win32_Proxy
$Array[UBound($Array) - 1][0] = $Obj.ProxyServer
$Array[UBound($Array) - 1][1] = $Obj.ProxyPortNumber
ReDim $Array[UBound($Array) + 1][2]
next
ReDim $Array[UBound($Array) - 1][2]
Return $Array
EndFunc

Other way is with regedit to modify the keys located in:

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

Share this post


Link to post
Share on other sites

One way is with WMI:

GetProxySetting()
SetProxySetting("someproxy.com",8080) 

Func SetProxySetting($myProxyServer , $myProxyPort)
$winmgmts = ObjGet("winmgmts:{impersonationLevel=impersonate}")
$win32_Proxy = $winmgmts.InstancesOf ("win32_Proxy")
Dim $Array[1]
for $Obj in $win32_Proxy
$result = $Obj.SetProxySetting($myProxyServer,$myProxyPort)
$Array[UBound($Array) - 1] = $result
ReDim $Array[UBound($Array) + 1]
next
ReDim $Array[UBound($Array) - 1]
Return $Array
EndFunc

Func GetProxySetting()
$winmgmts = ObjGet("winmgmts:{impersonationLevel=impersonate}")
$win32_Proxy = $winmgmts.InstancesOf ("win32_Proxy")
Dim $Array[1][2]
for $Obj in $win32_Proxy
$Array[UBound($Array) - 1][0] = $Obj.ProxyServer
$Array[UBound($Array) - 1][1] = $Obj.ProxyPortNumber
ReDim $Array[UBound($Array) + 1][2]
next
ReDim $Array[UBound($Array) - 1][2]
Return $Array
EndFunc

Other way is with regedit to modify the keys located in:

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

Thanks for that..

[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

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  
Followers 0