|
WMI Fun !! 〜 WMIに興味がある方・システム管理者必見!! 〜 WMI StepWMI SampleWMI ReferenceWMI LibraryPersonalLinkAbout WMI Fun !! |
|
|
|
WMI Fun !! > WMI Sample (VB) > アンチウイルスソフトウェアがインストールされていることを確認する |
|
|
Panasonic Let'snoteを長年愛用しています、その理由はMy Let'snoteで…
インクを買うよりもしかしたら安い?インクジェット複合機HP Photosmart 5510 白いご飯や日本酒にもとても合うにしんのきりこみがマイブームです アンチウイルスソフトウェアがインストールされていることを確認する: AntiVirusProduct - WMI Sample (VB)Topics
アンチウイルスソフトウェアがインストールされていることを確認するサンプルプログラムです。名前空間は「Root\SecurityCenter」、クラスが「AntiVirusProduct」になります。
Sample Code
Private Sub Command1_Click()
Dim AvpSet As SWbemObjectSet Dim Avp As SWbemObject Dim Locator As SWbemLocator Dim Service As SWbemServices Dim MesStr As String Set Locator = New WbemScripting.SWbemLocator Set Service = Locator.ConnectServer(, "Root\SecurityCenter") Set AvpSet = Service.ExecQuery("Select * From AntiVirusProduct") For Each Avp In AvpSet MesStr = MesStr & vbCrLf & "製造元:" & Avp.CompanyName & vbCrLf & _ "アンチウイルスソフト名:" & Avp.DisplayName & vbCrLf & _ "バージョン:" & Avp.versionNumber & vbCrLf Next MsgBox "インストールされているアンチウイルスソフトの情報です。" & _ vbCrLf & MesStr & vbCrLf & "ですよ。" Set AvpSet = Nothing Set Avp = Nothing Set Locator = Nothing Set Service = Nothing End Sub
Comment
実行すると現在インストールされているアンチウイルスソフトウェアを表示します。今回使用した「AntiVirusProduct」クラスはWindows XP SP2より追加された新しいクラスで、「Root\SecurityCenter」という新しい名前空間に定義されています。
Recommended book
個人的にお勧めする本の紹介です。
|
|
ご意見・ご要望・ご感想をこちらのアンケートからお待ちしています |
| ∧ ページの先頭へ… |