$file = @ScriptDir&"\list.ini"
$n = IniReadSection($file,"list")
For $1 = 1 To $n[0][0]
$reg1=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings"
RegWrite($reg1,"Hint","REG_SZ","11111")
RegWrite($reg1,"FileName0","REG_SZ","C:\\WINDOWS\\system32\\icrav03.rat")
RegWrite($reg1,"Key","REG_BINARY","0xF2295D433951241D858296F93F9981FC")
$reg2=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\.Default"
RegWrite($reg2,"Allow_Unknowns","REG_DWORD","00000001")
RegWrite($reg2,"Enabled","REG_DWORD","00000001")
RegWrite($reg2,"PleaseMom","REG_DWORD","00000000")
$reg3=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\.Default\http://www.icra.org/pics/vocabularyv03/"
RegWrite($reg3,"c","REG_DWORD","00000000")
RegWrite($reg3,"oh","REG_DWORD","00000000")
RegWrite($reg3,"og","REG_DWORD","00000000")
RegWrite($reg3,"of","REG_DWORD","00000000")
RegWrite($reg3,"oe","REG_DWORD","00000000")
RegWrite($reg3,"od","REG_DWORD","00000000")
RegWrite($reg3,"oc","REG_DWORD","00000000")
RegWrite($reg3,"ob","REG_DWORD","00000000")
RegWrite($reg3,"oa","REG_DWORD","00000000")
RegWrite($reg3,"l","REG_DWORD","00000000")
RegWrite($reg3,"v","REG_DWORD","00000000")
RegWrite($reg3,"s","REG_DWORD","00000000")
RegWrite($reg3,"n","REG_DWORD","00000000")
$reg4=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules"
RegWrite($reg4)
$reg5=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default"
RegWrite($reg5)
$reg6=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0"
RegWrite($reg6,"dwFlags","REG_DWORD","00000000")
RegWrite($reg6,"errLine","REG_DWORD","00000000")
$reg7=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy"
RegWrite($reg7,"PRNumPolicy","REG_DWORD","00000001")
$reg8=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\0"
RegWrite($reg8,"PRPPolicyAttribute","REG_DWORD","00000001")
$reg9=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\0\PRPPolicySub"
RegWrite($reg9,"PRNumURLExpressions","REG_DWORD","00000001")
$reg10=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\0\PRPPolicySub\0"
RegWrite($reg10,"PRBUInternetPattern","REG_DWORD","1")
RegWrite($reg10,"PRBUNonWild","REG_DWORD","29")
RegWrite($reg10,"PRBUSpecified","REG_DWORD","31")
RegWrite($reg10,"PRBUScheme","REG_SZ","http")
RegWrite($reg10,"PRBUHost","REG_SZ","ap12mf02")
RegWrite($reg10,"PRBUPort","REG_SZ","80")
RegWrite($reg10,"PRBUPath","REG_SZ","/index.asp")
RegWrite($reg10,"PRBUUrl","REG_SZ","http://ap12mf02/index.asp")
Next
我代码是批量设置http://ap12mf02/index.asp不能访问,而可以访问其他网站,如设置该网站可以访问,修改一以下: