|
这是论坛里面人家发的批处理里面找到的!
- @echo off
- ::为.exe程序快捷添加防火墙规则
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules" /f /v "MUIVerb" /t REG_SZ /d "防火墙规则"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules" /f /v "Icon" /t REG_SZ /d "FirewallControlPanel.dll,0"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules" /f /v "SubCommands" /t REG_SZ /d ""
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item0" /f /v "MUIVerb" /t REG_SZ /d "禁止入站"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item0" /f /v "Icon" /t REG_SZ /d "imageres.dll,-105"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item0\Command" /f /ve /t REG_SZ /d "mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall add rule name = ""%%1"" dir = in program = ""%%1"" action = block","","runas",0)(close)"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item1" /f /v "MUIVerb" /t REG_SZ /d "禁止出站"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item1" /f /v "Icon" /t REG_SZ /d "imageres.dll,-105"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item1\Command" /f /ve /t REG_SZ /d "mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall add rule name = ""%%1"" dir = out program = ""%%1"" action = block","","runas",0)(close)"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item2" /f /v "MUIVerb" /t REG_SZ /d "允许入站"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item2" /f /v "Icon" /t REG_SZ /d "imageres.dll,-106"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item2\Command" /f /ve /t REG_SZ /d "mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall delete rule name = ""%%1"" dir = in program = ""%%1""","","runas",0)(close)"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item3" /f /v "MUIVerb" /t REG_SZ /d "允许出站"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item3" /f /v "Icon" /t REG_SZ /d "imageres.dll,-106"
- reg add "HKCR\SystemFileAssociations\.exe\shell\FirewallRules\Shell\Item3\Command" /f /ve /t REG_SZ /d "mshta vbscript:createobject("shell.application").shellexecute("netsh.exe","advfirewall firewall delete rule name = ""%%1"" dir = out program = ""%%1""","","runas",0)(close)"
- reg add "HKCR\DesktopBackground\shell\Item0\shell\Item5" /f /v "MUIVerb" /t REG_SZ /d "防火墙规则"
复制代码
|
|