Created
March 26, 2019 20:41
-
-
Save rahman541/309c37d6e25044b9f3f3a5b13b1e873e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Block executable from internet access with Windows Firewall | |
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\exefile\shell] | |
[HKEY_CLASSES_ROOT\exefile\shell\Firewall: Add] | |
"HasLUAShield"="" | |
[HKEY_CLASSES_ROOT\exefile\shell\Firewall: Add\command] | |
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd && netsh advfirewall firewall add rule name=\\\"%1\\\" dir=out action=block program=\\\"%1\\\" & pause & exit' -Verb RunAs\"" | |
[HKEY_CLASSES_ROOT\exefile\shell\Firewall: Delete] | |
"HasLUAShield"="" | |
[HKEY_CLASSES_ROOT\exefile\shell\Firewall: Delete\command] | |
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd && netsh advfirewall firewall delete rule name=\\\"%1\\\" & pause & exit' -Verb RunAs\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Uninstall - Block executable from internet access with Windows Firewall | |
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\exefile\shell\Firewall: Add] | |
[-HKEY_CLASSES_ROOT\exefile\shell\Firewall: Delete] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment