diff options
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 |