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?
Problem with Rapid Accelerator and Windows Firewall
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Mike
2013-2-15
1 个评论
Jason Ross
2013-2-15
编辑:Jason Ross
2013-2-15
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.
更多回答(1 个)
Jason Ross
2013-2-15
You should be able to add an exception to the firewall and still keep the firewall running.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!