how can I determinate if the firewall is enabled on Windows XP?
And then, to add two ports? One TCP, one UDP?
As long as my software is 100% legal, Im doing this to make user's life
easier. Also, I dont care to make it silently. If windows will display a
warning for firewall changes, its ok with me!
Thanks
The command line utility NETSH can be used to do this.
http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/depfwset/wfsp2apb.mspx
Brian
C:\>netsh firewall show state
Firewall status:
-------------------------------------------------------------------
Profile = Standard
Operational mode = Disable
Exception mode = Enable
...
but for a German windows its going to be different. So its very difficult or
impossible to handle it like this.
any delphi-hardcore way to handle firewall rules?
Thanks
"Brian Evans" <NOS...@rogers.com> wrote in message
news:453e1fa4$1...@newsgroups.borland.com...
> Hello,
>
> how can I determinate if the firewall is enabled on Windows XP?
> And then, to add two ports? One TCP, one UDP?
I think you just try to access the ports with your app, and if Windows
Firewall is blocking, it tells the user that your app is trying to
access and asks should Win Firewall keep blocking or allow this app.
That happens on my machine all the time with new software that needs
port access.
--
Kevin Powick
In WinXP SP2 or later windows will detect that a program wants to listen on
a port and ask the user if they want to allow it to do so. Most other up to
date software firewalls do this too. Before that I believe it needs to be
opened manually by the user.
The real tricky problem is routers. Look around for info on using Universal
Plug and Play to configure the routers from within your program (if the
router supports UPnP - most new ones do). IIRC, it wasnt too difficult -
there's a com interface you can use.
HTH
Markus
"Bob D" <bo...@demo.it> schrieb im Newsbeitrag
news:453dcd91$1...@newsgroups.borland.com...
But, I run it and nothing happens. Not even a single message !
Whats wrong?
Thanks
"Markus Landwehr" <Markus....@uni.de> wrote in message
news:453e...@newsgroups.borland.com...
Its not a program that you can call with parameters. The ports are hard
coded. I use it to open ports, that are needed by an other program. I can
sipply start it and now my customers don't need to change something in the
xp-Firewall.
Please look at
const
DCNFirewallItems : Array [0..4] of ....
That array can be extended/changed. For each entry you can set Name,
Protocol and Port. These are registered as "exception" in the xp-Firewall.
If you compiled the program (i use Delphi 5) and started it, then look in
your xp-Firewall. You should find some entrys with "DCN ...".
Markus
"Bob D" <bo...@demo.it> schrieb im Newsbeitrag
news:453e...@newsgroups.borland.com...
> how can I determinate if the firewall is enabled on Windows XP?
> And then, to add two ports? One TCP, one UDP?
Windows XP SP2 introduced a COM-based API for accessing the firewall.
Windows Firewall and Windows Firewall with Advanced Security
http://msdn.microsoft.com/library/en-us/ics/ics/windows_firewall_start_page.asp
In particular, look at the INetFwProfile::FirewallEnabled property, and the
INetFwOpenPorts::Add() method.
Gambit
Now it works!
kein Problem.
Gruß, Markus
"Stefan Meisner" <stefan....@chello.at> schrieb im Newsbeitrag
news:453f...@newsgroups.borland.com...