jaydeep Posted January 29, 2010 Share Posted January 29, 2010 my program uses a tcp connection to connect via a network...whenever i install a client program in the computers connected to the network, it is 1st blocked by the windows firewall... if i unblock then it runs i wnated to know of a way to directly run the program without the firewall blocking it... Link to comment Share on other sites More sharing options...
trancexx Posted January 29, 2010 Share Posted January 29, 2010 Sure. Run it as administrator and before you try to connect allow it with the firewall.For this one you google allow firewall registry ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Metalhead Posted January 29, 2010 Share Posted January 29, 2010 Have you tried adding code in your script to disable the firewall through cmd?Run("cmd.exe", "c:\windows\system32\)WinWaitActive("C:\WINDOWS\system32\cmd.exe") <------- Title might be diferentSend("netsh firewall opmode disable" & @CRLF)WinClose("C:\WINDOWS\system32\cmd.exe"=============================================To add your script to the exceptions list so that it does not get blocked try this. (in sace you want to kepp the firewall up)run("cmd.exe", "c:\windows\system32\)WinWaitActive("C:\WINDOWS\system32\cmd.exe") <------- Title might be diferentSend("netsh firewall set allowedprogram c:\yourprogram.exe ProgramName ENABLE" & @CRLF)WinClose("C:\WINDOWS\system32\cmd.exe"===========================================To add the port itself:run("cmd.exe", "c:\windows\system32\)WinWaitActive("C:\WINDOWS\system32\cmd.exe") <------- Title might be diferentSend("netsh firewall set portopening (PROTOCOL Ex, TCP) (PORT NUMBER) (NameForDescription)" & @CRLF) <--without parentesis around protocol, portnumber and name description-------->WinClose("C:\WINDOWS\system32\cmd.exe"I hope this helps. I am new with autoit, so there might be other ways to do it that I have not found yet. Link to comment Share on other sites More sharing options...
jaydeep Posted January 29, 2010 Author Share Posted January 29, 2010 Have you tried adding code in your script to disable the firewall through cmd?Run("cmd.exe", "c:\windows\system32\)WinWaitActive("C:\WINDOWS\system32\cmd.exe") <------- Title might be diferentSend("netsh firewall opmode disable" & @CRLF)WinClose("C:\WINDOWS\system32\cmd.exe"=============================================To add your script to the exceptions list so that it does not get blocked try this. (in sace you want to kepp the firewall up)run("cmd.exe", "c:\windows\system32\)WinWaitActive("C:\WINDOWS\system32\cmd.exe") <------- Title might be diferentSend("netsh firewall set allowedprogram c:\yourprogram.exe ProgramName ENABLE" & @CRLF)WinClose("C:\WINDOWS\system32\cmd.exe"===========================================To add the port itself:run("cmd.exe", "c:\windows\system32\)WinWaitActive("C:\WINDOWS\system32\cmd.exe") <------- Title might be diferentSend("netsh firewall set portopening (PROTOCOL Ex, TCP) (PORT NUMBER) (NameForDescription)" & @CRLF) <--without parentesis around protocol, portnumber and name description-------->WinClose("C:\WINDOWS\system32\cmd.exe"I hope this helps. I am new with autoit, so there might be other ways to do it that I have not found yet.wonderful suggestion ill try it out... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now