Disabling firewall with a script

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
|
 
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!
 
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
| > |
| >
| >
| >
 
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<----------------------
 
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
 
Back
Top