Anyone know how to disable Windows XP's (SP2) firewall through sysprep?

JackBurton

Lifer
Jul 18, 2000
15,993
14
81
I've looked all over the place and can't find a site that gives me information on what parameters I need to set in my sysprep.inf file. WTH? Anyone here know how to do it?
 

mikecel79

Platinum Member
Jan 15, 2002
2,858
1
81
I don't think there is a way to do this with Sysprep natively but you can easily accomplish this with a script that Sysprep calls at the end of the configuration.

In your i386 folder where you are storing the Windows install files create a folder called $OEM$ if there is not one already. Then go into that folder and create a CMDLINE.TXT file. In there put a single line that looks like this: DisableFirewall.bat.

Now create a batch file called DisableFirewall.bat and save it in the $OEM$ folder. In the batch file put in this command:

@echo off
netsh firewall set opmode disable

Sysprep executes all the commands in the cmdlines.txt file at the end of the install. This will disable the built in firewall in any version of Windows XP.
 

JackBurton

Lifer
Jul 18, 2000
15,993
14
81
Originally posted by: mikecel79
I don't think there is a way to do this with Sysprep natively but you can easily accomplish this with a script that Sysprep calls at the end of the configuration.

In your i386 folder where you are storing the Windows install files create a folder called $OEM$ if there is not one already. Then go into that folder and create a CMDLINE.TXT file. In there put a single line that looks like this: DisableFirewall.bat.

Now create a batch file called DisableFirewall.bat and save it in the $OEM$ folder. In the batch file put in this command:

@echo off
netsh firewall set opmode disable

Sysprep executes all the commands in the cmdlines.txt file at the end of the install. This will disable the built in firewall in any version of Windows XP.
Dude, you are awesome man. I'll try it out tomorrow. By the way, does that also disable the warning Security Center will display when the firewall is disabled? I already have a firewall in place, that is why I need Windows firewall disabled.

 

mikecel79

Platinum Member
Jan 15, 2002
2,858
1
81
No the Security Center will still warn you that the firewall is there. But there is a way of setting that too.

In the same batch file you created add this line under the netsh line.:

regedit /s DisableNotify.reg

Then open up Notepad and create a file with the below items in it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center]
"FirewallOverride"=dword:00000001

Save this file to the $OEM$ folder and call it DisableNotify.reg. This key tells the Security Center to not notify you about the firewall.
 

JackBurton

Lifer
Jul 18, 2000
15,993
14
81
Hey man, just an FYI. I found this REALLY kick ass guide for customizing Windows XP SP2's firewall. It is definitely worth a read.