无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 9096|回复: 26

[已解决] 有没有哪个大神帮忙写个在文件夹上右键,断网和恢复联网文件夹下所以exe文件的程序?

[复制链接]
发表于 2024-8-30 17:49:35 | 显示全部楼层
9chengwo 发表于 2023-10-1 09:15
我改了格式,现在不会乱码了,但是我把某个EXE文件用这个禁止入站和禁止出站,
为啥在防火墙规则设置里 ...

代码问题

你用我的注册表吧


#右键 添加 为.exe程序 添加/删除防火墙规则
  1. Windows Registry Editor Version 5.00

  2. #右键 添加 为.exe程序 添加/删除防火墙规则
  3. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules]
  4. "MUIVerb"="防火墙规则 添加/删除"
  5. "Icon"="FirewallControlPanel.dll,0"
  6. "SubCommands"=""

  7. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell]

  8. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item1]
  9. "MUIVerb"="为此程序添加禁止入站规则"
  10. "Icon"="imageres.dll,-105"

  11. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item1\command]
  12. @="mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall add rule name = ""%1"" dir = in program = ""%1"" action = block","","runas",0)(close)"

  13. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item2]
  14. "MUIVerb"="为此程序删除禁止入站规则"
  15. "Icon"="imageres.dll,-106"

  16. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item2\command]
  17. @="mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall delete rule name = ""%1"" dir = in program = ""%1""","","runas",0)(close)"

  18. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item3]
  19. "MUIVerb"="为此程序添加禁止出站规则"
  20. "Icon"="imageres.dll,-105"
  21. "CommandFlags"=dword:00000020

  22. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item3\command]
  23. @="mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall add rule name = ""%1"" dir = out program = ""%1"" action = block","","runas",0)(close)"

  24. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item4]
  25. "MUIVerb"="为此程序删除禁止出站规则"
  26. "Icon"="imageres.dll,-106"

  27. [HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item4\command]
  28. @="mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall delete rule name = ""%1"" dir = out program = ""%1""","","runas",0)(close)"

复制代码




#右键 删除 为.exe程序 添加/删除防火墙规则
  1. Windows Registry Editor Version 5.00

  2. #右键 删除 为.exe程序 添加/删除防火墙规则

  3. [-HKEY_CLASSES_ROOT\SystemFileAssociations\.exe\shell\FirewallRules]
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2026-1-21 17:27

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表