{"id":412,"date":"2015-11-13T12:43:34","date_gmt":"2015-11-13T04:43:34","guid":{"rendered":"http:\/\/www.huike007.cn\/?p=412"},"modified":"2015-11-13T12:43:34","modified_gmt":"2015-11-13T04:43:34","slug":"windows%e7%ad%89%e4%bf%9d%e5%ae%89%e5%85%a8%e6%a3%80%e6%9f%a5%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"http:\/\/www.huike007.cn\/?p=412","title":{"rendered":"windows\u7b49\u4fdd\u5b89\u5168\u68c0\u67e5\u811a\u672c"},"content":{"rendered":"<p>for win2008,win2012<br \/>\n\u4fdd\u5b58\u4e3aVBS\u683c\u5f0f\u3002<br \/>\n\u7ba1\u7406\u5458\u6743\u9650CMD\u6267\u884ccscript+\u811a\u672c\u540d<br \/>\n=============================================================<br \/>\nOn Error Resume Next<br \/>\nSet p = CreateObject(&#8220;WScript.Shell&#8221;).Exec(&#8220;%COMSPEC% \/c Md c:\\test3&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nSet p = CreateObject(&#8220;WScript.Shell&#8221;).Exec(&#8220;%COMSPEC% \/c secedit \/export \/cfg c:\\test3\\2.inf&#8221;)<br \/>\nWScript.Sleep 200<br \/>\nstrIniFile = &#8220;C:\\test3\\2.inf&#8221;<br \/>\nSet WshShell = Wscript.CreateObject(&#8220;Wscript.Shell&#8221;)<br \/>\nstrAdmi = ReadINI(strIniFile, &#8220;System Access&#8221;, &#8220;NewAdministratorName&#8221;)<br \/>\nstrGues = ReadINI(strIniFile, &#8220;System Access&#8221;, &#8220;EnableGuestAccount&#8221;)<br \/>\nstrPassCom = ReadINI(strIniFile, &#8220;System Access&#8221;, &#8220;PasswordComplexity&#8221;)<br \/>\nstrMaxPassAge = ReadINI(strIniFile, &#8220;System Access&#8221;, &#8220;MaximumPasswordAge&#8221;)<br \/>\nstrLockOut = ReadINI(strIniFile, &#8220;System Access&#8221;, &#8220;LockoutBadCount&#8221;)<br \/>\nstrRemoteShutDown = ReadINI(strIniFile, &#8220;Privilege Rights&#8221;, &#8220;SeRemoteShutdownPrivilege&#8221;)<br \/>\nstrShutdownPrivilege = ReadINI(strIniFile, &#8220;Privilege Rights&#8221;, &#8220;SeShutdownPrivilege&#8221;)<br \/>\nstrTakeOwnershipPrivilege = ReadINI(strIniFile, &#8220;Privilege Rights&#8221;, &#8220;SeTakeOwnershipPrivilege&#8221;)<br \/>\nstrDontDisplayLastUserName = ReadINI(strIniFile, &#8220;Registry Values&#8221;, &#8220;MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DontDisplayLastUserName&#8221;)<br \/>\nstrDisableDomainCreds = ReadINI(strIniFile, &#8220;Registry Values&#8221;, &#8220;MACHINE\\System\\CurrentControlSet\\Control\\Lsa\\DisableDomainCreds&#8221;)<br \/>\nstrDenyNetworkLogonRight = ReadINI(strIniFile, &#8220;Privilege Rights&#8221;, &#8220;SeDenyNetworkLogonRight&#8221;)<br \/>\nIntMaxPassAge = cint(strMaxPassAge)<br \/>\nIf IntMaxPassAge &lt;= 90 Then<br \/>\nstrMaxPassAge = &#8220;Maximum Password Age is no more than 90 days(comply)&#8221;<br \/>\nElse<br \/>\nstrMaxPassAge = &#8220;Maximum Password Age is? more than 90 days(not comply)&#8221;<br \/>\nEnd If<br \/>\nIntLockOut = cint(strLockOut)<br \/>\nIf IntLockOut &lt;= 6 Then<br \/>\nstrLockOut = &#8220;Account lockout threshold no more than 6 invalid logon attempts(comply)&#8221;<br \/>\nElse<br \/>\nstrLockOut = &#8220;Account lockout threshold? more than 6 invalid logon attempts(not comply)&#8221;<br \/>\nEnd If<br \/>\nIf strAdmi = &#8220;&#8221;&#8221;Administrator&#8221;&#8221;&#8221; Then<br \/>\nstrAdmi = &#8220;AdministratorName has not been changed(not comply)&#8221;<br \/>\nElse<br \/>\nstrAdmi = &#8220;AdministratorName has been changed(comply)&#8221;<br \/>\nEnd If<br \/>\nj = Instr(strDenyNetworkLogonRight,&#8221;Guest&#8221;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrDenyNetworkLogonRight = &#8220;Guest is included in DenyNetworkLogonRight (comply)&#8221;<br \/>\nElse<br \/>\nstrDenyNetworkLogonRight = &#8220;Guest is not included in DenyNetworkLogonRight (not comply)&#8221;<br \/>\nEnd If<br \/>\nj = Instr(strDontDisplayLastUserName,&#8221;0&#8243;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrDontDisplayLastUserName = &#8220;Don&#8217;t display last user name is disabled(not comply)&#8221;<br \/>\nElse<br \/>\nstrDontDisplayLastUserName = &#8220;Don&#8217;t display last user name is enabled(comply)&#8221;<br \/>\nEnd If<br \/>\nj = Instr(strDisableDomainCreds,&#8221;0&#8243;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrDisableDomainCreds = &#8220;Do not allow storage of passwords and credentials for network authentication is disabled(not comply)&#8221;<br \/>\nElse<br \/>\nstrDisableDomainCreds = &#8220;Do not allow storage of passwords and credentials for network authentication is enabled(comply)&#8221;<br \/>\nEnd If<br \/>\nj = Instr(strGues,&#8221;0&#8243;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrGues = &#8220;Guest account status is disabled(comply)&#8221;<br \/>\nElse<br \/>\nstrGues = &#8220;Guest account status is enabled(not comply)&#8221;<br \/>\nEnd If<br \/>\nj = Instr(strPassCom,&#8221;0&#8243;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrPassCom = &#8220;Password must meet complexity requirements is disabled(not comply)&#8221;<br \/>\nElse<br \/>\nstrPassCom = &#8220;Password must meet complexity requirements is enabled(comply)&#8221;<br \/>\nEnd If<br \/>\nj = Instr(strShutdownPrivilege,&#8221;,&#8221;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrShutdownPrivilege = &#8220;More than one has shut down the system Privilege(not comply) &#8221;<br \/>\nElse<br \/>\nstrShutdownPrivilege = &#8220;Only administrator has shut down the system Privilege(comply) &#8221;<br \/>\nEnd If<br \/>\nj = Instr(strTakeOwnershipPrivilege,&#8221;,&#8221;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrTakeOwnershipPrivilege = &#8220;More than one has take ownership of files or other objects Privilege(not comply)&#8221;<br \/>\nElse<br \/>\nstrTakeOwnershipPrivilege = &#8220;Only administrator has take ownership of files or other objects Privilege(comply)&#8221;<br \/>\nEnd If<br \/>\nj = Instr(strRemoteShutDown,&#8221;,&#8221;)<br \/>\nIf j &gt; 0 Then<br \/>\nstrRemoteShutDown = &#8220;More than one has force shutdown from a remote system Privilege(not comply)&#8221;<br \/>\nElse<br \/>\nstrRemoteShutDown = &#8220;Only administrator has force shutdown from a remote system Privilege(comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo?? strDisableDomainCreds &amp; vbCrLf &amp; strDenyNetworkLogonRight &amp; vbCrLf &amp;strDontDisplayLastUserName &amp; vbCrLf &amp; strShutdownPrivilege &amp; vbCrLf &amp;strTakeOwnershipPrivilege &amp; vbCrLf &amp;strRemoteShutDown &amp; vbCrLf &amp; strLockOut &amp; vbCrLf &amp; strAdmi &amp; vbCrLf &amp; strGues &amp; vbCrlf &amp; strPassCom &amp; vbCrLf &amp; strMaxPassAge<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = CreateObject(&#8220;Wscript.Shell&#8221;).RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters\\AutoShareSever&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue = &#8220;&#8221; Then<br \/>\nRegValue = &#8220;AutoShare need is not shutted down(not comply)&#8221;<br \/>\nElse<br \/>\nj = Instr(RegValue,&#8221;0&#8243;)<br \/>\nIf j &gt; 0 Then<br \/>\nRegValue = &#8220;AutoShare is shutted down(comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;AutoShare is not shutted down(not comply)&#8221;<br \/>\nEnd If<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoDriveTypeAutoRun&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nj = Instr(RegValue,&#8221;255&#8243;)<br \/>\nIf j &gt; 0 Then<br \/>\nWscript.Echo &#8220;AutoPlay Disabled(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;AutoPlay Enabled(not comply)&#8221;<br \/>\nEnd If<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\SNMP\\Parameters\\ValidCommunities\\public&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue = &#8220;&#8221; Then<br \/>\nRegValue = &#8220;community string is not public? or snmp? not started(not comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;community string is public(comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog\\application\\Maxsize&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue &lt; 8388608 Then<br \/>\nRegValue = &#8220;Application Log MaxSize is lower than 8192KB(not comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;Application Log MaxSize is not lower than 8192KB(comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog\\application\\Retention&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue = 0 Then<br \/>\nRegValue = &#8220;Application Log retention is true(comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;Application Log retention is false(not comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog\\Security\\Maxsize&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue &lt; 8388608 Then<br \/>\nRegValue = &#8220;Security Log MaxSize is lower than 8192KB(not comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;Security Log MaxSize is not lower than 8192KB(comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog\\Security\\Retention&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue = 0 Then<br \/>\nRegValue = &#8220;Security Log retention is true(comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;Security Log retention is false(not comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog\\System\\Maxsize&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue &lt; 8388608 Then<br \/>\nRegValue = &#8220;System Log MaxSize is lower than 8192KB(not comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;System Log MaxSize is not lower than 8192KB(comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nRegValue = &#8220;&#8221;<br \/>\nOn Error Resume Next<br \/>\nRegValue = WshShell.RegRead(&#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog\\System\\Retention&#8221;)<br \/>\nOn Error GoTo 0<br \/>\nIf RegValue = 0 Then<br \/>\nRegValue = &#8220;System Log retention is true(comply)&#8221;<br \/>\nElse<br \/>\nRegValue = &#8220;System Log retention is false(not comply)&#8221;<br \/>\nEnd If<br \/>\nWscript.Echo RegValue<br \/>\nSet p = CreateObject(&#8220;Wscript.Shell&#8221;).Exec(&#8220;%COMSPEC% \/c sc query MpsSvc&#8221;)<br \/>\nDo While p.Status = 0<br \/>\nWScript.Sleep 100<br \/>\nLoop<br \/>\nDo While p.StdOut.AtEndOfStream = False<br \/>\nstr = p.StdOut.Readline()<br \/>\nj = Instr(str,&#8221;STATE&#8221;)<br \/>\nIf j &gt; 0 Then<br \/>\nh = Instr(str,&#8221;1&#8243;)<br \/>\nIf h &gt; 0 Then<br \/>\nWscript.echo &#8220;firewall not on(not comply)&#8221;<br \/>\nElse<br \/>\nSet m = CreateObject(&#8220;WScript.Shell&#8221;).Exec(&#8220;%COMSPEC% \/c netsh advfirewall show currentprofile&#8221;)<br \/>\nDo While m.Status = 0<br \/>\nWScript.Sleep 100<br \/>\nLoop<br \/>\nDo While m.StdOut.AtEndOfStream = False<br \/>\nstr1 = m.StdOut.Readline()<br \/>\nIf Instr(str1,&#8221;\u72b6\u6001&#8221;) &gt; 0 Then<br \/>\nIf Instr(str1,&#8221;\u542f\u7528&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;firewall currentProfile is on(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;firewall currentProfile is off(not comply)&#8221;<br \/>\nEnd If<br \/>\nEnd If<br \/>\nLoop<br \/>\nEnd If<br \/>\nEnd If<br \/>\nLoop<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\nSet p = CreateObject(&#8220;WScript.Shell&#8221;).Exec(&#8220;%COMSPEC% \/c auditpol \/get \/category:*&#8221;)<br \/>\nDo While p.Status = 0<br \/>\nWScript.Sleep 100<br \/>\nLoop<br \/>\nDo While p.StdOut.AtEndOfStream = False<br \/>\nstr = p.StdOut.Readline()<br \/>\nIf Instr(str,&#8221;\u51ed\u636e\u9a8c\u8bc1&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Credential Vaildation Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Credential Vaildation not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;Kerberos \u8eab\u4efd\u9a8c\u8bc1\u670d\u52a1&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Kerberos Authentication Service Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Kerberos Authentication Service not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u8ba1\u7b97\u673a\u5e10\u6237\u7ba1\u7406&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Computer Account Management Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Computer Account Management not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u5b89\u5168\u7ec4\u7ba1\u7406&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Security Group Management Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Security Group Management not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u7528\u6237\u5e10\u6237\u7ba1\u7406&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;User Account Management Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;User Account Management not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u76ee\u5f55\u670d\u52a1\u66f4\u6539&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Directory Service Changes Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Directory Service Changes not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;? \u767b\u5f55&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Logon Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Logon not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u7f51\u7edc\u7b56\u7565\u670d\u52a1\u5668&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Network Policy Server Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Network Policy Server not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;? \u7279\u6b8a\u767b\u5f55&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Special Logon Success and Failure(not comply)&#8221;<br \/>\nElseIf Instr(str, &#8220;\u6210\u529f&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Special Logon Success(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Special Logon not Success(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u6587\u4ef6\u7cfb\u7edf&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;File System Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;File System not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u5ba1\u6838\u7b56\u7565\u66f4\u6539&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Audit Policy Change Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Audit Policy Change not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u8eab\u4efd\u9a8c\u8bc1\u7b56\u7565\u66f4\u6539&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Authentication Policy Change Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Authentication Policy Change not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221; \u654f\u611f\u6743\u9650\u4f7f\u7528?????????????? &#8220;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Sensitive Privilege use Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Sensitive Privilege use not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u5176\u4ed6\u7cfb\u7edf\u4e8b\u4ef6&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Other System Events Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Other System Events not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u5b89\u5168\u72b6\u6001\u66f4\u6539&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;Security State Change Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;Security State Change not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nElseIf Instr(str,&#8221;\u7cfb\u7edf\u5b8c\u6574\u6027&#8221;) &gt; 0 Then<br \/>\nIf Instr(str, &#8220;\u6210\u529f\u548c\u5931\u8d25&#8221;) &gt; 0 Then<br \/>\nWscript.Echo &#8220;System Integrity Success and Failure(comply)&#8221;<br \/>\nElse<br \/>\nWscript.Echo &#8220;System Integrity not Success and Failure(not comply)&#8221;<br \/>\nEnd If<br \/>\nEnd If<br \/>\nLoop<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\nFunction ReadInI(strIniFilePath, strPrimary, strSubKey)<br \/>\nDim objStream<br \/>\nSet objStream = CreateObject(&#8220;ADODB.Stream&#8221;)<br \/>\nWith objStream<br \/>\n.Type = 2<br \/>\n.Mode = 3<br \/>\n.Open<br \/>\n.Charset = &#8220;Unicode&#8221;<br \/>\n.LoadFromFile strIniFilePath<br \/>\nstrText = .ReadText<br \/>\n.Close<br \/>\nEnd With<br \/>\nSet objStream = Nothing<br \/>\narrText = Split(strText, vbCrLf)<br \/>\nFor Each strLine In arrText<br \/>\nIf intCount = 0 Then<br \/>\nIf strLine = &#8220;[&#8221; &amp; strPrimary &amp; &#8220;]&#8221; Then<br \/>\nintCount = 1<br \/>\nEnd If<br \/>\nElse<br \/>\nIf Left(strLine,1) = &#8220;[&#8221; Then Exit For<br \/>\nj = InStr(strLine, &#8220;=&#8221;)<br \/>\nIf j &gt; 0 Then<br \/>\nIf InStr(Left(strLine, j), strSubKey) &gt; 0 Then<br \/>\nReadInI = Trim(Right(strLine, Len(strLine) &#8211; InStr(strLine, &#8220;=&#8221;)))<br \/>\nExit For<br \/>\nEnd If<br \/>\nEnd If<br \/>\nEnd If<br \/>\nNext<br \/>\nEnd Function<br \/>\n=================================<\/p>\n","protected":false},"excerpt":{"rendered":"<p>for win2008,win2012 \u4fdd\u5b58\u4e3aVBS\u683c\u5f0f\u3002 \u7ba1\u7406\u5458\u6743\u9650CMD\u6267\u884ccscript+\u811a\u672c\u540d === [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[178],"tags":[364,363,360],"_links":{"self":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/412"}],"collection":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=412"}],"version-history":[{"count":1,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/412\/revisions"}],"predecessor-version":[{"id":413,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/412\/revisions\/413"}],"wp:attachment":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=412"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}