title: i can't remove all the windows 10 firewall rules
body: <p>I can't remove all the windows 10 firewall rules there are always left some rules that can't be removed and I don't know why. How can I remove all the windows 10 firewall rules? </p>
  
  <p>I'm running the application as administrator</p>
  
  <p>First, I get a list of all the firewall rules and store in a list: listaReglas
  then I make a loop on that list and call a function to remove the rule like this</p>
  
  <pre><code>listaReglas:=TlistaReglas.Create;
  ListarReglasdelFireWall(listaReglas);
  for i:=0 to listaReglas.TotalReglas-1 do begin
    unaRegla:= listaReglas.GetUnaRegla(i);
    if DELUnaRegla(unaRegla.name, error) then begin
       memo1.Lines.Add(IntToStr(i) + ' '+unaRegla.name +' removed OK')
      end else begin
       memo1.Lines.Add(IntToStr(i) + ' '+unaRegla.name +' ERROR removing')
    end;
  end;
  listaReglas.Free;
  </code></pre>
  
  <p>The function DELUnaRegla()</p>
  
  <pre><code>function DELUnaRegla(NombreRegla:String;var ERROR:String):boolean;
  var
   fwPolicy2       : OleVariant;
   vExisteError:Boolean;
  begin
   vExisteError:=False;
   try
    CoInitialize(nil);
    try
      fwPolicy2   := CreateOleObject('HNetCfg.FwPolicy2');
      fwPolicy2.Rules.Remove(NombreRegla);
    finally
    CoUninitialize;
   end;
   except
    on E:EOleException do begin
        Error:=Format('EOleException %s %x', [E.Message,E.ErrorCode]);
        vExisteError:=true;
    end;
  
    on E:Exception do begin
        Error:=E.Classname + ':' + E.Message;
        vExisteError:=true;
    end;
  end;
  result:=not(vExisteError);
  end;
  </code></pre>