void AddToFirewallException(string ApplicationName, string FilePath) { // Add exception to windows firewall after installation string RegPath = @"SYSTEM\ControlSet001\Services\SharedAccess\Parameters\ FirewallPolicy\StandardProfile\AuthorizedApplications\List"; string KeyValue = FilePath + ":*:Enabled:" + ApplicationName; RegistryKey Key = Registry.LocalMachine.OpenSubKey(RegPath, true); Key.SetValue(FilePath, KeyValue); Key.Close(); Key = null; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)