هو نفس الكود فقط بتغيير الكلمة
وعموما تفضل الكود باسم StartFirewall
وهذا كود الايقاف السابق StopFirewall
وعموما تفضل الكود باسم StartFirewall
PHP كود :
Private Sub StartFirewall()
Dim Program As Process = New Process
Dim top As String = "netsh.exe"
Program.StartInfo.Arguments = ("firewall set opmode enable")
Program.StartInfo.FileName = top
Program.StartInfo.UseShellExecute = False
Program.StartInfo.RedirectStandardOutput = True
Program.StartInfo.CreateNoWindow = True
Program.Start()
Program.WaitForExit()
End Sub
وهذا كود الايقاف السابق StopFirewall
PHP كود :
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
