We can disable firewall using firewall.cpl user interface. Another way to do the same is by editing the registry key “EnableFirewall“. We can find this registry key under in the below node.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfile
Setting the data in this parameter to 0 will disable firewall on the machine. To enable firewall you need to set the registry value to 1.
To disable exceptions to firewall policy add and set the below registry key to 1.
DoNotAllowExceptions(REG_DWORD) under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfile
Thanx it helped me in scripting.
The path with the slash:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile