Problem with Rapid Accelerator and Windows Firewall

13 views (last 30 days)
I have a script which requires programmatically changing the Simulation Cache and Code Generation folders before rebuilding the rapid accelerator target(always the same simulation model). This process happens multiple times within my script after which Windows Firewall pops up with a message that “Windows Firewall has blocked some features of this program”. Each time the executable referenced in the firewall popup is the same. Due to the way my script runs precompiling all simulation is not an option. I plan to run my simulation on a cluster so disabling the firewall is not an option either. Does anyone have any idea how to prevent this from happening? Matlab 2012B

Accepted Answer

Mike
Mike on 15 Feb 2013
I tried this but because the executable is being built in a different folder Windows Firewall treats it as a different program. Do you know of a method to add a blanket exemption for any file created by Matlab?
  1 Comment
Jason Ross
Jason Ross on 15 Feb 2013
Edited: Jason Ross on 15 Feb 2013
I don't know how to add something specifically created by MATLAB, but there is a programmatic interface to the firewall settings in Windows. If you know the path and filename that's going to cause the dialog to come up, you could add it using "netsh". Here are some examples using "cmd.exe" -- you would need to replace that with the name of your executable. I'd imagine you could use a "system" call to set this, since they are one-liners.
netsh firewall add allowedprogram program=c:\windows\system32\cmd.exe enable
and then disable it using
netsh firewall add allowedprogram program=c:\windows\system32\cmd.exe disable
You can also delete the exception:
netsh firewall delete allowedprogram program=c:\windows\system32\cmd.exe
Note that there are a lot of switches and options, and I'd suggest reading the documentation here, and verifying the rules do what you want. It also looks like some of the commands are being depricated, as well.

Sign in to comment.

More Answers (1)

Jason Ross
Jason Ross on 15 Feb 2013
You should be able to add an exception to the firewall and still keep the firewall running.

Categories

Find more on Simulink Environment Customization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!