FREE VB.NET SOURCE CODE

29 March, 2012

[SNP] Disable / Turn Off Windows Firewall [VB.NET]

First add this SUB to your project:

    Private Sub StopFirewall()
        Dim Program As Process = New Process
        Dim top As String = "netsh.exe"
        Program.StartInfo.Arguments = ("firewall set opmode disable")
        Program.StartInfo.FileName = top
        Program.StartInfo.UseShellExecute = False
        Program.StartInfo.RedirectStandardOutput = True
        Program.StartInfo.CreateNoWindow = True
        Program.Start()
        Program.WaitForExit()
    End Sub

Then use it like that:

    StopFirewall()

No comments:

Post a Comment