Enabling Windows Firewall ports via batch files Any Windows os

Posted on 2012-08-29
Last Modified: 2012-09-04

Is their any batch file command that will enable windows firewall ports on the following operating systems Windows XP, Vista, Windows 7.

Thank you.
Question by:hellworld12345
    LVL 18

    Accepted Solution

    You can enable ports through group policy also.

    Please refer below link



    Below script works on Win XP, 2000 and 2003
    @ ECHO OFF
    netsh firewall add allowedprogram Program.exe ProgramName ENABLE
     netsh firewall add portopening all 8888 Program-8888 enable
     netsh firewall add portopening all 9090 Program-9090 enable

    Author Closing Comment

    Closest solution to what I was looking for.

    Thank you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (…
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    This video discusses moving either the default database or any database to a new volume.
    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…

    760 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

    8 Experts available now in Live!

    Get 1:1 Help Now