Internet connection firewall (ICF)

B

Bjorn

HI all,
Is there anyone that know how I can enable the Internet
connection firewall (ICF) during installation of WXP or
though a script?

Björn
 
R

Rick Rokosh

This is a summary of a longer script I found somewhere else. I'm using this
today.

DIM ICSSC_DEFAULT, CONNECTION_PUBLIC, CONNECTION_PRIVATE, CONNECTION_ALL
DIM NetSharingManager
DIM PublicConnection, PrivateConnection
DIM EveryConnectionCollection

DIM objArgs
DIM con

ICSSC_DEFAULT = 0
CONNECTION_PUBLIC = 0
CONNECTION_PRIVATE = 1
CONNECTION_ALL = 2

set NetSharingManager = Wscript.CreateObject("HNetCfg.HNetShare.1")

if (IsObject(NetSharingManager)) = FALSE then
Wscript.Echo("Unable to get the HNetCfg.HnetShare.1 object")
else
if (IsNull(NetSharingManager.SharingInstalled) = TRUE) then
wscript.Echo("Sharing isn't available on this platform.")
else
set ConnectionCollection = NetSharingManager.EnumEveryConnection
for each Item in ConnectionCollection
set EveryConnection =
NetSharingManager.INetSharingConfigurationForINetConnection(Item)
set objNCProps = NetSharingManager.NetConnectionProps(Item)
if debugscript then wscript.echo "Checking connection:" & objNCProps.Name
if (objNCProps.Name) = "Local Area Connection" then
If debugscript then wscript.echo = "Enabling Firewall on
connection:" & objNCProps.Name
EveryConnection.EnableInternetFirewall
exit for
else
if debugscript then wscript.echo "Not a match for the requested
connection - " & objNCProps.Name
end if
next
end if
end if



HI all,
Is there anyone that know how I can enable the Internet
connection firewall (ICF) during installation of WXP or
though a script?

Björn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top