Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce6205f

Browse files
committed
Remove postgres.exe from Windows Firewall exception list when uninstall
1 parent cc6a7ec commit ce6205f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nsis/postgresql.nsi

+3
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ Section $(componentServer) sec1
623623
${ConfigWrite} "$DATA_DIR\pg_hba.conf" "host$\tall$\tall$\t" "0.0.0.0/0$\tmd5" $R0
624624
; Add postgres to Windows Firewall exceptions
625625
nsisFirewall::AddAuthorizedApplication "$INSTDIR\bin\postgres.exe" "PostgresPro server"
626+
626627
pop $0
627628
${else}
628629
!insertmacro _ReplaceInFile "$DATA_DIR\postgresql.conf" "#listen_addresses = 'localhost'" "listen_addresses = 'localhost'"
@@ -957,6 +958,8 @@ Section "Uninstall"
957958

958959
RMDir "$INSTDIR"
959960

961+
nsisFirewall::RemoveAuthorizedApplication "$INSTDIR\bin\postgres.exe"
962+
960963
Call un.DeleteInstallOptions
961964
SetShellVarContext all
962965

0 commit comments

Comments
 (0)