Set the following Code And save it as vbs.
Copy code The Code is as follows: if wscript. Arguments. Count = 0 then
Geti =-1
Else
Geti = CINT (wscript. Arguments (0 ))
End if
Call yourcode ()
'Write all the proxies you get into a file (ip.txt) in the format of one line: IP: Port
IPS = Createobject ("scripting. FileSystemObject"). opentextfile ("ip.txt", 1, true). readall
IPS = Split (IPs, vbcrlf)
For ips_ I = 0 to ubound (IPS)
If ips_ I> Geti then
Iptemp = Split (IPS (ips_ I ),":")
Changeproxy iptemp (0), iptemp (1)
Set wshshell = Createobject ("wscript. Shell ")
Wshshell. Run ("cscript" & wscript. scriptfullname & "& ips_ I)
Wscript. Quit
End if
Next
Sub yourcode ()
'Your code
End sub
'Use WMI change IE proxy)
function changeproxy (IP, Port)
'obtain the computer name
'set onetwork = wscript. createobject ("wscript. network ")
'computername = onetwork. computername
on error resume next
set ob1_miservice = GetObject ("winmgmts :\\. \ Root \ cimv2 ")
set objshare = ob1_miservice. get ("win32_proxy.servername = 'computername'")
set objinparam = objshare. methods _ ("setproxysetting "). inparameters. spawninstance _ ()
objinparam. properties _. item ("proxyportnumber") = port
objinparam. properties _. item ("proxyserver") = IP
set objoutparams = ob1_miservice. execmethod ("win32_proxy.servername = 'computername'", "setproxysetting", objinparam)
end function