Sample BAT file for configuring Win XP SP2 ICF Settings

G

Guest

Hi All,

I would like to turn on the following in XP SP2 ICF:

File And Print Sharing

Wit the use of Netsh, managed to execute in the command line:

Netsh
Firewall
Set Service FileandPrint Enable

How do I save the above commands into a BAT file so that after deploying XP
SP2, I can just run the BAT to configure the ICF.

I am in a PDC environment, so cannot use GPO to deploy the settings to ICF.

Thank you.
 
T

Torgeir Bakken \(MVP\)

Bryan said:
I would like to turn on the following in XP SP2 ICF:

File And Print Sharing

Wit the use of Netsh, managed to execute in the command line:

Netsh
Firewall
Set Service FileandPrint Enable

How do I save the above commands into a BAT file so that after deploying XP
SP2, I can just run the BAT to configure the ICF.

I am in a PDC environment, so cannot use GPO to deploy the settings to ICF.
Hi

Just run the following line:

Netsh.exe Firewall Set Service FileandPrint Enable

More about Netsh.exe in WF_XPSP2.doc "Deploying Windows Firewall
Settings for Microsoft Windows XP with Service Pack 2", downloadable from
http://www.microsoft.com/downloads/details.aspx?familyid=4454e0e1-61fa-447a-bdcd-499f73a637d1

If you deploy SP2 with a scripted SP2 installation, you can also use
netfw.inf so your FW configuration changes comes in as part of the
SP2 installation (this way it is no need for any post Netsh.exe
instructions).

More about this here:
http://groups.google.com/[email protected]
 
G

Guest

Thanks a lot!

Problem solved :)

Torgeir Bakken (MVP) said:
Hi

Just run the following line:

Netsh.exe Firewall Set Service FileandPrint Enable

More about Netsh.exe in WF_XPSP2.doc "Deploying Windows Firewall
Settings for Microsoft Windows XP with Service Pack 2", downloadable from
http://www.microsoft.com/downloads/details.aspx?familyid=4454e0e1-61fa-447a-bdcd-499f73a637d1

If you deploy SP2 with a scripted SP2 installation, you can also use
netfw.inf so your FW configuration changes comes in as part of the
SP2 installation (this way it is no need for any post Netsh.exe
instructions).

More about this here:
http://groups.google.com/[email protected]


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 

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