using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace guvenlikdvr
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Type typ = Type.GetTypeFromProgID("HNetCfg.FwMgr");
dynamic dyn = Activator.CreateInstance(typ);
MessageBox.Show("Güvenlik Duvarı Durumu = " + Convert.ToString(dyn.LocalPolicy.CurrentProfile.FirewallEnabled));
}
}
}
0 yorum:
Yorum Gönder