Firewallmenu.reg 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Windows Registry Editor Version 5.00
  2. ;Copyright 2016 Trottle
  3. ;This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3.
  4. ;This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  5. ;See <http://www.gnu.org/licenses/> for more details.
  6. [-HKEY_CLASSES_ROOT\exefile\shell\FWc]
  7. [HKEY_CLASSES_ROOT\exefile\shell\FWc]
  8. "MUIVerb"="Set firewall rules"
  9. "Icon"="imageres.dll,102"
  10. "subcommands"=""
  11. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\01]
  12. "MUIVerb"="block inbound"
  13. "Icon"="imageres.dll,100"
  14. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\01\command]
  15. @="cmd /q /c echo CreateObject(\"Shell.Application\").ShellExecute \"cmd\", \"/q /c chcp 1251 & netsh advfirewall firewall add rule name=\"\"%1\"\" dir=in action=block program=\"\"%1\"\" enable=yes | msg * \", \"\", \"runas\" > %%temp%%\\ev.vbs & cscript %%temp%%\\ev.vbs & del %%temp%%\\ev.vbs"
  16. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\02]
  17. "MUIVerb"="allow inbound"
  18. "Icon"="imageres.dll,101"
  19. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\02\command]
  20. @="cmd /q /c echo CreateObject(\"Shell.Application\").ShellExecute \"cmd\", \"/q /c chcp 1251 & netsh advfirewall firewall add rule name=\"\"%1\"\" dir=in action=allow program=\"\"%1\"\" enable=yes | msg * \", \"\", \"runas\" > %%temp%%\\ev.vbs & cscript %%temp%%\\ev.vbs & del %%temp%%\\ev.vbs"
  21. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\03]
  22. "Icon"="imageres.dll,100"
  23. "MUIVerb"="block outbound"
  24. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\03\command]
  25. @="cmd /q /c echo CreateObject(\"Shell.Application\").ShellExecute \"cmd\", \"/q /c chcp 1251 & netsh advfirewall firewall add rule name=\"\"%1\"\" dir=out action=block program=\"\"%1\"\" enable=yes | msg * \", \"\", \"runas\" > %%temp%%\\ev.vbs & cscript %%temp%%\\ev.vbs & del %%temp%%\\ev.vbs"
  26. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\04]
  27. "MUIVerb"="allow outbound"
  28. "Icon"="imageres.dll,101"
  29. "CommandFlags"=dword:00000040
  30. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\04\command]
  31. @="cmd /q /c echo CreateObject(\"Shell.Application\").ShellExecute \"cmd\", \"/q /c chcp 1251 & netsh advfirewall firewall add rule name=\"\"%1\"\" dir=out action=allow program=\"\"%1\"\" enable=yes | msg * \", \"\", \"runas\" > %%temp%%\\ev.vbs & cscript %%temp%%\\ev.vbs & del %%temp%%\\ev.vbs"
  32. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\06]
  33. "MUIVerb"="Show firewall panel"
  34. "Icon"="imageres.dll,109"
  35. [HKEY_CLASSES_ROOT\exefile\shell\FWc\shell\06\command]
  36. @="mmc.exe wf.msc"
  37. ; If you do not want to have uninstaller you can skip next part:
  38. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FWcSubMenu]
  39. "DisplayName"="'Set firewall rules' submenu"
  40. "DisplayIcon"="imageres.dll,102"
  41. "UninstallString"="cmd /q /c echo Windows Registry Editor Version 5.00>%TEMP%\\pr.reg & echo.>>%TEMP%\\pr.reg & echo [-HKEY_CLASSES_ROOT\\exefile\\shell\\FWc]>>%TEMP%\\pr.reg & echo.>>%TEMP%\\pr.reg & echo [-HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\FWcSubMenu]>>%TEMP%\\pr.reg & regedit /s %TEMP%\\pr.reg & del %TEMP%\\pr.reg"
  42. "DisplayVersion"="1.1"
  43. "URLInfoAbout"="http://habrahabr.ru/post/317802/"
  44. "NoModify"=dword:00000001
  45. "NoRepair"=dword:00000001