noTme 发表于 2005-3-23 21:00:41

使用脚本列示已经安装过的补丁

*************将本行以下部分复制到记事本中,保存为*.vbs文件后执行即可***************



' 使用脚本列示已经安装过的补丁
' 及其安装ID、描述、日期及实施者
strComputer = "."
Set objWMIService = GetObject ("winmgmts:{impersonationLevel = impersonate}!\\" & strComputer & "\root\cimv2")
Set colQuickFixes = objWMIService.ExecQuery(" Select * from Win32_QuickFixEngineering")
Set objFS = CreateObject ("Scripting.FileSystemObject")
Set objNF = objFS.CreateTextFile("InstallHotfixes.htm")
objNF.Writeline "<html>"
objNF.writeline "<head>"
objNF.writeline "<title>InstallHotfixes</title>"
objNF.writeline "</head>"
objNF.writeline "<body>"
objNF.writeline "<h3>Hotfix report -- Date:"&Now()&" </h3>" & vbcrlf
objNF.writeline "<table border = 1 style = font-size:9pt>"
objNF.writeline "<tr>"
objNF.writeline "<td>Computer:</td>"
objNF.writeline "<td>Description:</td>"
objNF.writeline "<td>HotFixID:</td>"
objNF.writeline "<td>Installation Date:</td>"
objNF.writeline "<td>Installed By:</td>"
objNF.writeline "</tr>"
for each objQuickFix in colQuickFixes
objNF.writeline "<tr>"
objNF.writeline "<td> "& objQuickFix.CSName & "</td> "
objNF.writeline "<td> "& objQuickFix.Description &" </td> "
objNF.writeline "<td> "& objQuickFix.HotFixID &" </td>"
objNF.writeline "<td> "& objQuickFix.InstallDate &" </td>"
objNF.writeline "<td> "& objQuickFix.InstalledBy &" </td>"
objNF.writeline "</tr>"
next
objNF.writeline "</table>"
objNF.writeline "</body>"
objNF.writeline "</html>"
objNF.close
set objshell = wscript.createobject("wscript.shell")
objshell.run "InstallHotfixes.htm"

雷刃 发表于 2005-3-28 21:57:54

这个很实用,我喜欢,收藏先!~

星河 发表于 2005-4-14 20:25:36

谢谢
手下了,

king7758 发表于 2005-8-17 02:43:16

收藏

有前途有前途有前途有前途有前途有前途有前途有前途有前途有前途有前途有前途
页: [1]
查看完整版本: 使用脚本列示已经安装过的补丁