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

Impex
0
Impex
Asked:
Impex
1 Solution
 
craylordCommented:
http://www.microsoft.com/downloads/details.aspx?FamilyID=4454e0e1-61fa-447a-bdcd-499f73a637d1&DisplayLang=en

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.
(kixtart)

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

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

[ICF.AddReg.DomainProfile]
HKLM,"SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List","%windir%\system32\sessmgr.exe",0x00000000,"%windir%\system32\sessmgr.exe:*:enabled:@xpsp2res.dll,-22019"
HKLM,"SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile","DoNotAllowExceptions",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile","EnableFirewall",0x00010001,0
0
 
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.

'-----start-----------------------------------------------------------------------
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"
                  objService.StopService()
                  errReturnCode = objService.Change( , , , , "Disabled")
            Else
                  'WScript.Echo "Not Running"
                  'errReturnCode = objService.Change( , , , , "Automatic")
                  'objService.StartService()
            End If
      Next
                  
      End If
0

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