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