Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Problem with Rapid Accelerator and Windows Firewall

Asked by Mike on 15 Feb 2013

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

0 Comments

Mike

Products

No products are associated with this question.

2 Answers

Answer by Mike on 15 Feb 2013
Accepted answer

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

http://technet.microsoft.com/en-us/library/cc771046(v=ws.10).aspx

Mike
Answer by Jason Ross on 15 Feb 2013

You should be able to add an exception to the firewall and still keep the firewall running.

0 Comments

Jason Ross

Contact us