Disabling firewall with a script

G

Guest

How can i disable the firewall with a script.
Do I need to modify the registry? If yes how can I modify the registry if
the firewall is activated?

Thanks
 
J

Jim Macklin

just download a virus, it will "fix" your firewall.


| How can i disable the firewall with a script.
| Do I need to modify the registry? If yes how can I modify
the registry if
| the firewall is activated?
|
| Thanks
|
 
G

Guest

Not good answer, it would be enough to write: It is not possible!.

Thanks.

I am administrator of the computers, the anly metter is the the computers
are too much!
 
J

Jim Macklin

Let see, you did not identify the type of firewall. You
have some task you want to perform, but did not say what
that was/is either.
You don't communicate well, " I am administrator of the
computers, the anly metter is the the computers
| are too much!" means what to you, it means nothing to me.




| Not good answer, it would be enough to write: It is not
possible!.
|
| Thanks.
|
| I am administrator of the computers, the anly metter is
the the computers
| are too much!
|
|
| "Jim Macklin" wrote:
|
| > just download a virus, it will "fix" your firewall.
| >
| >
message
| >
| > | How can i disable the firewall with a script.
| > | Do I need to modify the registry? If yes how can I
modify
| > the registry if
| > | the firewall is activated?
| > |
| > | Thanks
| > |
| >
| >
| >
 
T

Torgeir Bakken \(MVP\)

AntoS said:
How can i disable the firewall with a script.
Do I need to modify the registry? If yes how can I modify the
registry if the firewall is activated?
Hi

If you have Active Directory, use Group Policy for this, more about
Windows Firewall Group Policy settings in WF_XPSP2.doc:
http://www.microsoft.com/downloads/details.aspx?familyid=4454e0e1-61fa-447a-bdcd-499f73a637d1


If Group Policy is not an option:

An alternative is to set some registry settings before or after the
SP2 installation so the FW disables itself when it finds those
registry settings.

The registry settings are:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile
\EnableFirewall=0 (DWORD data type)

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile
\EnableFirewall=0 (DWORD data type)

(adding the registry values after SP2 is installed will also disable
the firewall at next startup)

Those registry values are documented in WF_XPSP2.doc

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


This VBScript (.vbs) creates the registry values that disables the
firewall:

'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")

oShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall" _
& "\DomainProfile\EnableFirewall", 0, "REG_DWORD"

oShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall" _
& "\StandardProfile\EnableFirewall", 0, "REG_DWORD"

'--------------------8<----------------------
 
G

Guest

Thank you Torgeir, that's what we hav done.



Torgeir Bakken (MVP) said:
Hi

If you have Active Directory, use Group Policy for this, more about
Windows Firewall Group Policy settings in WF_XPSP2.doc:
http://www.microsoft.com/downloads/details.aspx?familyid=4454e0e1-61fa-447a-bdcd-499f73a637d1


If Group Policy is not an option:

An alternative is to set some registry settings before or after the
SP2 installation so the FW disables itself when it finds those
registry settings.

The registry settings are:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile
\EnableFirewall=0 (DWORD data type)

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile
\EnableFirewall=0 (DWORD data type)

(adding the registry values after SP2 is installed will also disable
the firewall at next startup)

Those registry values are documented in WF_XPSP2.doc

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


This VBScript (.vbs) creates the registry values that disables the
firewall:

'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")

oShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall" _
& "\DomainProfile\EnableFirewall", 0, "REG_DWORD"

oShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall" _
& "\StandardProfile\EnableFirewall", 0, "REG_DWORD"

'--------------------8<----------------------

--
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

Similar Threads

How to disable Windows Firewall service in XP SP2 2
Disable Firewall 2
firewall script 1
Firewall : IP protocol specific settings ? 64
Service Pack 3 Issue 5
Turning off Windows Firewall 7
firewall xp 6
Registry 5

Top