From 18df61517c1e910b3ce95a8b87c194a2d3c0cddc Mon Sep 17 00:00:00 2001 From: Itms Date: Mon, 20 Oct 2025 19:17:14 +0200 Subject: [PATCH] Wipe NSIS install preferences when uninstalling The user language and start menu folder name were saved, which goes against recommendations in the NSIS documentation. The installation directory was also saved, which might make sense, but prevents us from dropping the "alpha" label. Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8476 Fixes: #7594 --- source/tools/dist/0ad.nsi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/tools/dist/0ad.nsi b/source/tools/dist/0ad.nsi index b35f87d26c..80c39406be 100644 --- a/source/tools/dist/0ad.nsi +++ b/source/tools/dist/0ad.nsi @@ -29,9 +29,6 @@ InstallDir "$LOCALAPPDATA\0 A.D. Empires Ascendant" ; NOTE: "0 A.D." doesn't work as a folder/start menu folder name, the final dot gets stripped. - ;Get installation folder from registry if available - InstallDirRegKey HKCU "Software\0 A.D." "" - RequestExecutionLevel user ;-------------------------------- @@ -234,6 +231,10 @@ uninst: done: + ;In alpha versions, the uninstaller preserved the registry key containing user install preferences + DeleteRegKey HKCU "Software\0 A.D." + ClearErrors + FunctionEnd Function CreateDesktopLink @@ -290,7 +291,7 @@ Section "Uninstall" RMDir "$SMPROGRAMS\$StartMenuFolder" DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." - DeleteRegKey /ifempty SHCTX "Software\0 A.D." + DeleteRegKey SHCTX "Software\0 A.D." ;Unregister .pyromod file association ${unregisterExtension} ".pyromod" "Pyrogenesis mod"