| - WMI Fun !! -|WMI Step|WMI Sample|WMI Reference|WMI LibraryLinks|About WMI Fun !! |
|
|
|
|
Home > WMI Sample > WindowsファイアウォールのICMP設定をする
|
|
WindowsファイアウォールのICMP設定をする: HNet_FwIcmpSettings
■Topics
WindowsファイアウォールのICMP設定を行うサンプルです。名前空間は「Root\Microsoft\HomeNet」、クラスが「Hnet_FwIcmpSettings」になります。
Private Sub Command1_Click()
Dim FisSet As SWbemObjectSet Dim Fis As SWbemObject Dim Locator As SWbemLocator Dim Service As SWbemServices Dim MesStr As String Set Locator = New WbemScripting.SWbemLocator Set Service = Locator.ConnectServer(, "Root\Microsoft\HomeNet") Set FisSet = Service.ExecQuery("Select * From HNet_FwIcmpSettings") For Each Fis In FisSet Fis.AllowInboundEchoRequest = "True" Next MsgBox "エコー要求の着信の設定を有効にしました。" Set FisSet = Nothing Set Fis = Nothing Set Service = Nothing Set Locator = Nothing End Sub
実行するとWindowsファイアウォールをICMPエコー(要するにPing)の着信に対して応答する設定に変更します。 なおWMIの使い方(VB6,VBS,VB.NET,VC#,PowerShell対象)に関してはWMI Stepも参考にしてみてください。
|
|
ご意見・ご感想をこちらのアンケートからお待ちしています
解らないIT/パソコン用語は - WMI Fun !! - http://www.wmifun.net/ Microsoft社のテクノロジーであるWMI(Windows Management Instrumentation)の使い方を Visual Basicを使ってのんびり公開しています VBや.Net Framework(VB,C#)以外でもWSH(VBS)やPowerShellなどのスクリプトでも使えますよ! 資産管理や監視業務の効率化、システム系ツール開発にお勧めです This web site created by Toh. Copyright(C) 1997-2010 WMI Fun !!. All rights reserved. このサイトへのリンクはフリーです |
| ∧ ページの先頭へ… |