Solved

Detect Windows Firewall ON or OFF in code

Posted on 2008-10-21
3
873 Views
Last Modified: 2013-12-17
I would like to put some code in my application that checks to see if Windows Firewall (for that matter any firewall) is turned ON. The application needs to have it turned off on the first run so that it can detect local installations of SQL Server.

If it is ON then a message box would be displayed asking the user to turn it off temporarily.

Thanks
0
Comment
Question by:rrooks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
justin-clarke earned 500 total points
ID: 22766987
Try using this.

It has the correct example in C# for what you need.

http://www.shafqatahmed.com/2008/01/controlling-win.html
0
 
LVL 1

Author Comment

by:rrooks
ID: 22767111
beauty justin...that looks to be exactly what i need. i searched google and here with no luck on fidning anything.

I wont have time to implement it until next thursday or friday but will award you the points anyway now.

thanks again.
0
 
LVL 4

Expert Comment

by:justin-clarke
ID: 22767706
Excellent glad to help.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question