示例#1
0
        public static bool IsWindowsFirewallExceptionsAllowed()
        {
            int ret = RegistryUtils.GetRegistryKeyInt32Value(@"SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile", "DoNotAllowExceptions");

            return(ret != 1);
        }
示例#2
0
        public static bool IsWindowsFirewallEnabled()
        {
            int ret = RegistryUtils.GetRegistryKeyInt32Value(@"SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile", "EnableFirewall");

            return(ret == 1);
        }