Windows Firewall - RemoteAdminSettings

Windows Firewall - RemoteAdminSettings

am 07.12.2007 18:26:00 von Roger

Hi All,
I am trying to programmatically enable RemoteAdminSettings in WindowsFirewall.

I have checked all the Micosoft documentation and have written VB.net code
to do as suggested.
I cannot enable Remote Administration programmatically.

Following is the code
Dim oFireWall As Object
Dim oPolicy As Object
Dim oApp As Object

oFireWall = CreateObject("HNetCfg.FwMgr")
oPolicy = oFireWall.LocalPolicy.CurrentProfile
oApp = oPolicy.RemoteAdminSettings
oApp.Enabled = True
oApp.scope = 0
oApp.RemoteAddresses = "*"
The above code does not generate an ErrorException.
It simply does not have the desired effect.
I also tried gpupdate / wait=0 to force the policy change (no joy there)

I use similar code to successfully add a program to the Exceptions List of
Windows Firewall.

I can/have used gpedit.msc snap-in to manually enable Remote Administration
in WindowsFirewall.

Frustrating!!!!!!!!!!!!!!!!!!!

Any suggestions? Help?
--
Roger