Bug 15109 – Always gets install dir wrong when uninstalling previous version
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
installer
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2015-09-24T14:54:39Z
Last change time
2018-05-06T19:40:22Z
Assigned to
Brad Anderson
Creator
Manu
Comments
Comment #0 by turkeyman — 2015-09-24T14:54:39Z
When installing a new version, it first uninstalls the prior version. It always gets the install path wrong.
The default install dir is C:\D, but I never install there (who wants to spam the root directory?), I install to C:\dev\D. It first offers to uninstall, but there is a greyed out (not-editable) text box showing C:\D (NOT where DMD is installed on my machine), and I can't do anything but click continue. It them complains that it can't find DMD at that path (no shit!), and fails to uninstall. It then proceeds to install the new version, but having failed to uninstall the prior version, it all gets a little messy.
DMD installer should remember where it's installed.
Comment #1 by dlang-bugzilla — 2015-10-15T18:04:54Z
I think we can fix this by saving the path in the registry, by adding:
InstallDirRegKey HKCU "Software\D" "InstallPath"
at the top and
WriteRegStr HKCU "Software\D" "InstallPath" $INSTDIR
at the bottom (install Section).
Comment #2 by dlang-bugzilla — 2015-10-15T18:06:14Z
Hm, looking at the code, it already does that!
InstallDirRegKey HKCU "Software\${DName}" "InstallationFolder"
...
WriteRegStr HKLM "SOFTWARE\${DName}" "InstallationFolder" "$INSTDIR"
I guess it's not working for some reason?
Comment #3 by turkeyman — 2015-10-15T23:55:37Z
I just updated to the latest DMD, and the latest installer seems to be working working.
I think it may have been fixed after my last NG rant. ;)
I'll confirm this on a second PC.
Comment #4 by dlang-bugzilla — 2015-10-15T23:57:11Z
According to git blame, it's been doing this since Brad's revamp on 2014-07-08.
Comment #5 by turkeyman — 2015-10-16T01:07:50Z
Maybe old installations had the registry populated with a bad path?