Jo
Code:
Public Class Form1
Private Sub Enable_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Proc As Process = New Process
Dim top As String = "netsh.exe"
Proc.StartInfo.Arguments = ("firewall set opmode enable")
Proc.StartInfo.FileName = top
Proc.StartInfo.UseShellExecute = False
Proc.StartInfo.RedirectStandardOutput = True
Proc.StartInfo.CreateNoWindow = True
Proc.Start()
Proc.WaitForExit()
End Sub
Private Sub Disable_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Proc As Process = New Process
Dim top As String = "netsh.exe"
Proc.StartInfo.Arguments = ("firewall set opmode disable")
Proc.StartInfo.FileName = top
Proc.StartInfo.UseShellExecute = False
Proc.StartInfo.RedirectStandardOutput = True
Proc.StartInfo.CreateNoWindow = True
Proc.Start()
Proc.WaitForExit()
End Sub
End Class