Thread overview
[Issue 20489] Installer deleting files after install
Jan 08, 2020
Rainer Schuetze
Jan 09, 2020
Simen Kjaeraas
Jan 10, 2020
Simen Kjaeraas
Feb 08, 2020
Dlang Bot
Feb 08, 2020
Rainer Schuetze
Feb 12, 2020
Simen Kjaeraas
Feb 12, 2020
Dlang Bot
Feb 12, 2020
Rainer Schuetze
January 08, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario@gmx.de

--- Comment #1 from Rainer Schuetze <r.sagitario@gmx.de> ---
I tried to reproduce this, but for me, the uninstaller is blocking the installer until it is finished. The NSIS script is using an ExecWait statement to run the uninstaller.

Maybe ExecWait doesn't work for some reason. What Windows version are you running? Mine is Win 10 1903. What version are you uninstalling?

--
January 09, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

--- Comment #2 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
Win10 1903, so that shouldn't be it. Could be work's overzealous antivirus or somesuch, I guess. Tested it both upgrading from 2.089.0 and just reinstalling 2.090.0 over the botched 2.090.0 install I ended up with. In total I tried it 7 or 8 times, and managed to recreate the issue 4 or 5 times.

I tried it again on a different computer today (but still a work machine, so could still be their antivirus - I'll be trying it at home tomorrow), and after seven installs didn't manage to get it to remove every single file even once, but had partial installs five times. I tried this with both 2.090.0 and 2.078.0 with identical results.

--
January 10, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

--- Comment #3 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
Tested at home today, and I'm unable to recreate the issue. Looking at the install folder uninstall.exe is deleted within a quarter second of the uninstaller completing, while this would take several seconds at work.

Looking at the .nsi script there is a 1s sleep after the uninstaller returns before the uninstaller is invoked again in an Exec statement, which doesn't wait for its completion.

Conceivably this could be an ExecWait, or uninstall.exe's existence could be tested before the copying of files starts.

--
February 08, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@rainers created dlang/installer pull request #428 "[WIP] fix Issue 20489 - Installer deleting files after install" fixing this issue:

- fix Issue 20489 - Installer deleting files after install

  wait for uninstaller to terminate

https://github.com/dlang/installer/pull/428

--
February 08, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

--- Comment #5 from Rainer Schuetze <r.sagitario@gmx.de> ---
(In reply to Simen Kjaeraas from comment #3)
> Conceivably this could be an ExecWait, or uninstall.exe's existence could be tested before the copying of files starts.

Please try the win_release artifact fom https://dev.azure.com/dlanguage/Installer/_build/results?buildId=7719&view=artifacts&type=publishedArtifacts

--
February 12, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

--- Comment #6 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
Out of 15 attempts, I've managed to get a borked install once. That's even stranger, so I'm prepared to call it a fluke and say the fix works - at the very least the incidence rate is a lot lower.

--
February 12, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/installer pull request #428 "[WIP] fix Issue 20489 - Installer deleting files after install" was merged into master:

- d65cac1c1c699cc55dc38af76b634a043c3c1ac3 by Rainer Schuetze:
  fix Issue 20489 - Installer deleting files after install

  wait for uninstaller to terminate

https://github.com/dlang/installer/pull/428

--
February 12, 2020
https://issues.dlang.org/show_bug.cgi?id=20489

--- Comment #8 from Rainer Schuetze <r.sagitario@gmx.de> ---
Thanks for testing and the hint at the error.

--