找回密码
 注册
搜索
热搜: java php web
查看: 274|回复: 1

vbs获取hotfix列表

[复制链接]
发表于 2009-12-23 10:05:26 | 显示全部楼层 |阅读模式
' List Installed Hot Fixes


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'setting Excel application
Set excel=CreateObject("Excel.Application")
excel.Visible=True
Set workbook1=excel.Workbooks.Add()
Set worksheet=workbook1.Worksheets.Item(1)

Set colQuickFixes = objWMIService.ExecQuery _
("Select * from Win32_QuickFixEngineering")
Dim i
i=1
For Each objQuickFix In colQuickFixes
    worksheet.Cells(i,1)= "Computer: " & objQuickFix.CSName
    worksheet.Cells(i,2)= "Description: " & objQuickFix.Description
    worksheet.Cells(i,3)= "Hot Fix ID: " & objQuickFix.HotFixID
    worksheet.Cells(i,4)= "Installation Date: " & objQuickFix.InstallDate
    worksheet.Cells(i,5) ="Installed By: " & objQuickFix.InstalledBy
    i=i+1
Next

worksheet.UsedRange.EntireColumn.Autofit()
发表于 2009-12-25 17:15:15 | 显示全部楼层
哪天来试试,看好不好使

评分

1

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|软晨网(RuanChen.com)

GMT+8, 2024-11-14 12:52

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表