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:\MyApp\MyApp.exe MyApp ENABLE
I 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的更多相关文章
- [Windows Azure] Adding Sign-On to Your Web Application Using Windows Azure AD
Adding Sign-On to Your Web Application Using Windows Azure AD 14 out of 19 rated this helpful - Rate ...
- win7防火墙打不开(无法启动windows firewall服务)
点击windows 7控制面板中防火墙的“推荐配置”没有反应:打开“服务”,无法启动windows firewall,并报错. 可能很多的win7用户都碰到过这样的一种情况,那就是win7的防火墙打 ...
- How to Programmatically Add/Delete Custom Options in Magento? - See more at: http://apptha.com/blog/
In this tutorial, I would like to help out Magento developers and clients with how to programmatical ...
- windows defender和windows firewall
Windows defender: Windows Defender,曾用名Microsoft Anti Spyware,是一个杀毒程序,可以运行在Windows XP和Windows Server ...
- 关掉Windows Firewall的PowerShell
在Windows 8或Windows 2012 R2上, 使用下面的命令: Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled ...
- SQL Server: Windows Firewall with Advanced Security
SQL Database Engine: TCP 1433 & UDP 1434 SQL Analysis Service: TCP 2383 (2382 if named instance) ...
- Turn Off Windows Firewall Using PowerShell and CMD
If you want to turn off the Windows Firewall, there are three methods. One is using the GUI which is ...
- [Windows] [Firewall] 增加进入规则
netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP l ...
- No such application config! Please add dubbo:application
SpringBoot运行找不到application.properties配置文件 运行springBoot项目启动报错:java.lang.IllegalStateException: No suc ...
随机推荐
- Linux访问Window共享文件夹的配置步骤
1. Window下创建用户XXX(作用:Linux mount时需要提供用户和密码) 2. Window下共享文件夹给XXX用户,并根据实际需要设置读取/写入权限 3. Linux下创建挂载的目录 ...
- 第八节:time和random模块
定义: 模块是一组Python代码的集合,可以使用其他模块,也可以被其他模块使用. 重点: 1.模块的名字不要和自带的模块名字相同,不然会优先调用自己的那个模块,因为查找模块的时候是按照sys.pat ...
- TcxGrid
一.列的宽度为64时,其宽度会自动根据字段的长度调整,设置其他值即为固定值: 二.cell中显示按钮:选中某列,在properties中更改为ButtonEdit,点击子属性buttons添加butt ...
- Java匹马行天下之JavaSE核心技术——异常处理
Java匹马行天下之JavaSE核心技术——异常处理 异常的简介 在Java中,异常就是Java在编译.运行或运行过程中出现的错误. 程序错误分为三种:编译错误.运行时错误和逻辑错误 编译错误是因为程 ...
- Obtain The String CodeForces - 1295C binary_search+思维
妈耶,,,被B题卡到哭,C题一发就过了... 字符串问题.首先用vector记录每个字符出现的位置,然后对字符串t的每个字符,用二分查找函数查找,注意用upper_bound查找,对于字符i,首先用变 ...
- Windows线程+进程通信
一 Windows线程进程 1)定义 按照MS的定义, Windows中的进程简单地说就是一个内存中的可执行程序, 提供程序运行的各种资源. 进程拥有虚拟的地址空间, 可执行代码, 数据, 对象句柄集 ...
- tensorflow1.0 矩阵相乘
import tensorflow as tf matrix1 = tf.constant([[3,3]]) matrix2 = tf.constant([[2],[2]]) product = tf ...
- solr管理集合
其实完全版的管理,在web页面上就有. 同时,在官网文档上,也有:https://lucene.apache.org/solr/guide/6_6/coreadmin-api.html#CoreAdm ...
- Java 学习线路图
学习是一个循序渐进的过程,是一件非常难得坚持的事情.如果真的想学Java,一定要下定决心! 这里我分享给你的Java学习线路图,希望对你有帮助,以下为2020年更新版本,黑马君在2020年更新了Jav ...
- 自动化之SaltStack
一.SaltStack 简介 Salt,,一种全新的基础设施管理方式,部署轻松,在几分钟内可运行起来,扩展性好,很容易管理上万台服务器,速度够快,服务器之间秒级通讯. salt底层采用动态的连接总线, ...