Skip to content

Commit 3387db2

Browse files
windows: Force user to uninstall previous IDE
It is known that sometimes installing new IDE on top of older installation can break new installation. Eclipse is especially fragile. In addition previous installation might include some custom files which might be overwritten. It is possible to start uninstaller from GUI of new installer, but we do not do this here, mostly because it is expected that after uninstalling user will have to uninstall leftover files from eclipse Signed-off-by: Anton Kolesov <[email protected]>
1 parent 0664fe5 commit 3387db2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

windows-installer/installer.nsi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ SetCompressor zlib
5454
#SetCompressor /FINAL lzma
5555

5656
# Our registry key for uninstallation
57-
!define uninstreg "Software\Microsoft\Windows\CurrentVersion\Uninstall\${entry_name}_${arcver}"
57+
!define uninstreg "Software\Microsoft\Windows\CurrentVersion\Uninstall\${entry_name}"
5858

5959
# We want admin rights
6060
RequestExecutionLevel admin
@@ -89,6 +89,12 @@ Function .onInit
8989
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
9090
Quit
9191
${EndIf}
92+
93+
ReadRegStr $0 HKLM "${uninstreg}" "UninstallString"
94+
${If} $0 != ""
95+
MessageBox mb_iconstop "Please, uninstall previous version of ${arctitle} first."
96+
Abort
97+
${EndIf}
9298
FunctionEnd
9399

94100
#

0 commit comments

Comments
 (0)