fix(windows): keep firewall install idempotent

This commit is contained in:
2026-08-22 19:27:10 -04:00
parent 6b9a72aee5
commit 7217015d1f
+4
View File
@@ -56,6 +56,10 @@ Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilen
[Run]
; iroh uses UDP hole-punching; pre-authorizing avoids a mid-call firewall prompt.
; Delete first so an upgrade replaces our owned rule instead of accumulating an
; identical rule on every install. `netsh delete` removes every matching rule;
; its no-match exit code on a first install is harmless to Inno Setup.
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall delete rule name=""PeerSpeak"""; Flags: runhidden; Tasks: firewall
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""PeerSpeak"" dir=in action=allow program=""{app}\{#MyAppExeName}"" enable=yes profile=any"; Flags: runhidden; Tasks: firewall
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent