diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-07 13:48:28 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-07 13:48:28 +0200 |
| commit | ade41b05cce4a555197116568664220c5b3be9fa (patch) | |
| tree | ee0124111e4e500d648a133db7feedfec13b4f2b /packages/meshbay-client/build/installer-light.nsh | |
| parent | 3d5a168ee592c28c696e445c623c9f8d2996b715 (diff) | |
| download | meshbay-ade41b05cce4a555197116568664220c5b3be9fa.tar.gz | |
fix(client): remove firewall rules and boot task on uninstall, unasked
The Yes/No before it defaulted to No, so they stayed behind. Read both
unelevated and raise the UAC prompt only when one is left.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-client/build/installer-light.nsh')
| -rw-r--r-- | packages/meshbay-client/build/installer-light.nsh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/meshbay-client/build/installer-light.nsh b/packages/meshbay-client/build/installer-light.nsh index 86e41ba..7717331 100644 --- a/packages/meshbay-client/build/installer-light.nsh +++ b/packages/meshbay-client/build/installer-light.nsh @@ -53,15 +53,16 @@ !macroend !macro customUnInstall - ; Opt-in, default No -- a stale allow-rule is inert, so this should not - ; nag. A silent uninstall skips it entirely (no UAC prompt of its own). + ; Same as the full installer: the UAC prompt alone, no question before it, + ; and only when a rule is still there. A silent uninstall skips it (it may + ; not raise UI). ${IfNot} ${Silent} - MessageBox MB_YESNO|MB_ICONQUESTION \ - "Remove MeshBay Light's Windows Firewall rules? This needs one administrator confirmation. They are harmless if left." \ - /SD IDNO IDNO mb_keep_firewall + nsExec::Exec '"${MB_PWSH}" -NoProfile -ExecutionPolicy Bypass -File "$INSTDIR\resources\firewall.ps1" any' + Pop $R1 ; 0 = at least one rule exists + ${If} $R1 == 0 ExecShellWait "runas" "${MB_PWSH}" \ '-NoProfile -ExecutionPolicy Bypass -File "$INSTDIR\resources\firewall.ps1" remove' \ SW_HIDE - mb_keep_firewall: + ${EndIf} ${EndIf} !macroend |