Skip to content

Commit 0b866e0

Browse files
committed
Remove PG_OLD_REG_KEY data on uninstall
1 parent 7583083 commit 0b866e0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

nsis/postgresql.nsi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,27 @@ Function un.DeleteInstallOptions
758758
DeleteRegValue HKLM "${PG_REG_SERVICE_KEY}" "Service Account"
759759
DeleteRegKey /ifempty HKLM "${PG_REG_KEY}"
760760
DeleteRegKey /ifempty HKLM "${PG_REG_SERVICE_KEY}"
761+
762+
ReadRegStr $1 HKLM "${PG_OLD_REG_KEY}" "Version"
763+
${if} $1 != "" ;we have old install
764+
DeleteRegValue HKLM "${PG_OLD_REG_KEY}" "Version"
765+
DeleteRegValue HKLM "${PG_OLD_REG_KEY}" "Base Directory"
766+
DeleteRegValue HKLM "${PG_OLD_REG_KEY}" "Data Directory"
767+
DeleteRegValue HKLM "${PG_OLD_REG_KEY}" "Service Account"
768+
DeleteRegValue HKLM "${PG_OLD_REG_KEY}" "Service ID"
769+
DeleteRegValue HKLM "${PG_OLD_REG_KEY}" "Super User"
770+
DeleteRegValue HKLM "${PG_OLD_REG_KEY}" "Branding"
771+
DeleteRegValue HKLM "${PG_OLD_REG_SERVICE_KEY}" "Port"
772+
DeleteRegValue HKLM "${PG_OLD_REG_SERVICE_KEY}" "Locale"
773+
;for compatibility
774+
DeleteRegValue HKLM "${PG_OLD_REG_SERVICE_KEY}" "Data Directory"
775+
DeleteRegValue HKLM "${PG_OLD_REG_SERVICE_KEY}" "Database Superuser"
776+
DeleteRegValue HKLM "${PG_OLD_REG_SERVICE_KEY}" "Display Name"
777+
DeleteRegValue HKLM "${PG_OLD_REG_SERVICE_KEY}" "Product Code"
778+
DeleteRegValue HKLM "${PG_OLD_REG_SERVICE_KEY}" "Service Account"
779+
DeleteRegKey /ifempty HKLM "${PG_OLD_REG_KEY}"
780+
DeleteRegKey /ifempty HKLM "${PG_OLD_REG_SERVICE_KEY}"
781+
${endif}
761782
FunctionEnd
762783

763784
Function un.ChecExistInstall

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy