RSS订阅优然探索
你的位置:首页 » 学习收藏 » 正文

vbs 检测更新补丁

选择字号: 超大 标准 发布时间:2008-10-25 14:37:9 | 作者:admin | 0个评论 | 人浏览

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"
 

标签:

猜你喜欢

发表评论

必填

选填

选填

必填,不填不让过哦,嘻嘻。

记住我,下次回复时不用重新输入个人信息

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。