最是人间留不住,朱颜辞镜花辞树。这篇文章主要讲述Programmatically add an application to Windows Firewall相关的知识,希望能为你提供帮助。
Programmatically add an application to Windows Firewall回答1
Not sure if this is the best way, but running netsh should work:
netsh firewall add allowedprogram C:MyAppMyApp.exe MyApp ENABLEI think this requires Administrator Permissions though,for obvious reasons :)
Edit: I just don‘t know enough about ClickOnce to know whether or not you can run external programs through it.
回答2
I found this article, which has a complete wrapper class included for manipulating the windows firewall. Adding an Application to the Exception list on the Windows Firewall
http://web.archive.org/web/20070707110141/http://www.dot.net.nz/Default.aspx?tabid=42& mid=404& ctl=Details& ItemID=8
【Programmatically add an application to Windows Firewall】
推荐阅读
- Android Handler 机制(Handler 运行机制完整梳理)
- VasSonic Android源码解析
- Android中Crash(闪退,崩溃)的一般问题
- ASP Application 对象
- Flutter App打包配置(android平台)
- NetCore+Dapper WebApi架构搭建(基本框架)
- 1443. Minimum Time to Collect All Apples in a Tree
- jenkins发布application且并运行
- (开源)arduino连接ESP8266-01制作数据实时监测系统+手机App显示