根据前一编文章http://windyma.blog.51cto.com/661702/1967027 用户脚本基础上
在脚本文件kixtart.kix里添加如下内容:
;先获取客户端IP地址 $SUBNET = Ltrim(SubStr(@IPADDRESS0, 1, 8)) $TEMP = @IPADDRESS0 $IP="" FOR $Counter=1 TO 15 IF SUBSTR($TEMP,$Counter,1) = " " $IP=$IP + "0" ELSE $IP=$IP + SUBSTR($TEMP,$Counter,1) ENDIF NEXT $Network=SUBSTR($IP,1,11) ;根据不同IP段是否启用IE代理,如下为70,71,73三段IP不启用,其它启用IE代理 SELECT Case $Network = "192.168.070" WRITEVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Internet Settings", "ProxyEnable", "0", "Reg_DWORD") GOTO ENDIESETTING Case $Network = "192.168.071" WRITEVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Internet Settings", "ProxyEnable", "0", "Reg_DWORD") GOTO ENDIESETTING Case $Network = "192.168.073" WRITEVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Internet Settings", "ProxyEnable", "0", "Reg_DWORD") GOTO ENDIESETTING ENDSELECT WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Internet Settings", "ProxyEnable", "1", "Reg_DWORD") :ENDIESETTING ;设置IE代理服务器地址,同时根据不同用户组,使用不同的代理服务器 IF INGROUP ("Proxy-100") WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Internet Settings", "ProxyServer", "192.168.38.100:8080", "Reg_SZ") ELSE WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Internet Settings", "ProxyServer", "192.168.38.111:8080", "Reg_SZ") ENDIF
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。