PC Review Forums Newsgroups Windows XP Windows XP Security Programmatically Configuring the Windows XP Firewall

Reply

Programmatically Configuring the Windows XP Firewall

 
Thread Tools Rate Thread
Old 10-02-2006, 05:12 PM   #1
=?Utf-8?B?SkpK?=
Guest
 
Posts: n/a
Default Programmatically Configuring the Windows XP Firewall


I have a C++ Windows Service that needs to add itself to the Exceptions List
of the Win XP SP2 firewall.

When the service starts it simply stuffs this key -

C:\<Path to app>\<AppName>.exe

and this value -

C:\<Path to app>\<AppName>.exe:*:Enabled:<AppName>

into -

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List

and

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List

The issue is this -

It only seems to work on a few computers (all running the same build of XP)
- on those computers where it doesn't work our app doesn't show up in the
list of Exceptions in the firewall configuration.

I've tried manually adding my app to the Exceptions list in firewall config
and it suddenly starts working. I've WinDiff'd registry snapshots before I
manually configure the firewall and after I make the manual change and there
are no differences??

Any ideas?

Cheers.
  Reply With Quote
Old 16-02-2006, 03:53 AM   #2
Steven L Umbach
Guest
 
Posts: n/a
Default Re: Programmatically Configuring the Windows XP Firewall

You might try using the netsh firewall command as shown in the link below.
Keep in mind however that if Group Policy applies to any computers that the
"manual" changes will be overridden at the next Group Policy forced refresh
or when the Group Policy is updated or refreshed if registry changes are
reapplied at every GP refresh. --- Steve


"JJJ" <JJJ@discussions.microsoft.com> wrote in message
news:00BAB31B-C765-45E8-B9B2-36F08B0B3FBB@microsoft.com...
>I have a C++ Windows Service that needs to add itself to the Exceptions
>List
> of the Win XP SP2 firewall.
>
> When the service starts it simply stuffs this key -
>
> C:\<Path to app>\<AppName>.exe
>
> and this value -
>
> C:\<Path to app>\<AppName>.exe:*:Enabled:<AppName>
>
> into -
>
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List
>
> and
>
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List
>
> The issue is this -
>
> It only seems to work on a few computers (all running the same build of
> XP)
> - on those computers where it doesn't work our app doesn't show up in the
> list of Exceptions in the firewall configuration.
>
> I've tried manually adding my app to the Exceptions list in firewall
> config
> and it suddenly starts working. I've WinDiff'd registry snapshots before
> I
> manually configure the firewall and after I make the manual change and
> there
> are no differences??
>
> Any ideas?
>
> Cheers.



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off