Disable the firewall of windows XP

Posted on 2005-05-04
Last Modified: 2010-04-14
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,

Question by:Impex
    LVL 16

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

    LVL 17

    Expert Comment

    by:Jared Luker
    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

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    Outlook Free & Paid Tools
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now