• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Disable the firewall of windows XP

Hi all,

I am using windows 2000 server as a DC and windows XP pro as client. I am looking for any way to disable to firewall of windows XP by using GPO or something like that, so that I don't need to go to every machine physically or give the administrator’s password to the users.

Thank you,

1 Solution

or if you use a login script, you could configure the firewall to be off for your domain and copy the netfw.inf file to the XP sp2 machine.

if @producttype = "Windows XP Professional" and @CSD = "Service Pack 2"
copy "\\server\share\netfw.inf" c:\windows\inf\
shell "netsh firewall reset"

In the netfw.inf file replace domainprofile info with this.

Jared LukerCommented:
I use VBScript to do that.  You can call it via a startup script if you like:
This script checks to see if the firewall service exists (via wmi), and if it does, you can enable or disable it based on your preference.

Dim WshShell, WshSysEnv, objFSO, WshNetwork
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshNetwork = WScript.CreateObject("WScript.Network")      'Network Object
strComputer = "."

      Dim colServices, objWMIService, errReturnCode
      Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
      Set colServices = objWMIService.ExecQuery ("Select * from Win32_Service Where Name = 'SharedAccess'")
      if colservices.count > 0 Then
      'If we want the firwall off on all systems than use objservice.stopservice(), otherwise switch it to objService.StartService()
      'to turn it on.
      For Each objService in colServices
            If objService.state = "Running" Then
                  'WScript.Echo "Running"
                  errReturnCode = objService.Change( , , , , "Disabled")
                  'WScript.Echo "Not Running"
                  'errReturnCode = objService.Change( , , , , "Automatic")
            End If
      End If

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now