Link to home
Start Free TrialLog in
Avatar of FreightTrain
FreightTrainFlag for United States of America

asked on

Programmatically opening a port on Windows with a script.

I have an application that communicates on a port via TCP/IP and I want the user to be able to run a batch file that will open a specified port through the Windows Firewall.  I am unsure as to what I need to do.  Please let me know.

Thanks,

JP
ASKER CERTIFIED SOLUTION
Avatar of siranm
siranm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee W, MVP
Avatar of FreightTrain

ASKER

Perfect Solution.  Thank you so much!  I didn't realize something like this would be so easy!!!  
Avatar of choswoot
choswoot

all = TCP + UDP ; change to need
10550 port change to port needed
TEST - chnage to Exceptions Name

Add this to your batch file
netsh firewall set portopening all 10550 TEST ENABLE