Comment 5 for bug 385550

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 385550] Re: Unexpected error when uninstalling QBZR

Arno van Rensburg пишет:
> It is quite easy to duplicate (without losing your program files
> directory)
>
> 1. Create a random directory (say C:\Temp)
> 2. Copy some files you are willing to loose into that directory
> 3. Copy the uninstall.exe file into that directory, and run it.
>
> The C:\Temp directory and its contents will be wiped.

So, this is actually mistake in our installer script (for NSIS installer
compiler). Look at qbzr/installer/qbzr-setup.nsi, in the end of this
file you'll found these section:

; Uninstall
Section Uninstall

   RMDir /r "$INSTDIR"

   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
   DeleteRegKey HKLM "Software\QBzr\${PRODUCT_NAME}"

SectionEnd

It seems like directive 'RMDir /r "$INSTDIR"' force deletion of entire
directory where qbzr was installed.

So problem detected. This was good news.

The bad news: I'm not very familiar with NSIS installer scripts format.
I'm using Inno Setup installer for my own needs. I know how to
reimplement current NSIS instaler approach with Inno Setup, and make
sure we never delete more than needed. I'll do that for next release.

Sorry again for disaster with your Program Files folder :-(