WMI Fun !! 〜 WMI に興味がある方・システム管理者必見! 〜 |
|
![]() |
WMI Fun !! > WMI Sample (VB) > Windows ファイアウォールの ICMP 設定を取得する |
中古車買うならやっぱり
IT 関連情報を気軽に知りたい方へ、 私も使っていますお勧め SIM フリースマホ ASUS Zenfone Windows ファイアウォールの ICMP 設定を取得する: HNet_FwIcmpSettings - WMI Sample (VB)Topics
現在の Windows ファイアウォールの ICMP (Internet Control Message Protocol) 設定を取得するサンプルプログラムです。
Sample Code
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 MesStr = MesStr & "エコー要求の着信: " & Fis.AllowInboundEchoRequest & vbCrLf & _ "マスク要求の着信: " & Fis.AllowInboundMaskRequest & vbCrLf & _ "ルータ要求の着信: " & Fis.AllowInboundRouterRequest & vbCrLf & _ "タイムスタンプ要求の着信: " & Fis.AllowInboundTimestampRequest & vbCrLf & _ "到達できない宛先の送信: " & Fis.AllowOutboundDestinationUnreachable & vbCrLf & _ "パラメータ問題の送信: " & Fis.AllowOutboundParameterProblem & vbCrLf & _ "送信元抑制: " & Fis.AllowOutboundSourceQuench & vbCrLf & _ "時間経過の送信: " & Fis.AllowOutboundTimeExceeded & vbCrLf & _ "リダイレクトを許可: " & Fis.AllowRedirect & vbCrLf Next MsgBox "Windowsファイアウォールの ICMP 設定の情報です。" & vbCrLf & vbCrLf & _ MesStr & vbCrLf & "ですよ。" Set FisSet = Nothing Set Fis = Nothing Set Service = Nothing Set Locator = Nothing End Sub
![]() Comment
実行すると現在の Windows ファイアウォールの ICMP 設定内容が表示されます。 ![]() Recommended book
個人的にお勧めする本の紹介です。 ![]() |
ご意見・ご要望・ご感想をこちらのアンケートからお待ちしています |
∧ ページの先頭へ… |