Archive: Bug - Uninstallsection


Bug - Uninstallsection
Hello!

My Problem is, that I cannot delete the start menu entries :(.
I use MakeNSIS v2.0b3 (ModernUI, MultiLanguage), Windows 2000 SP2.
One sees in the log-file that the setup doesn't even try the deletion yet.


Section "Uninstall"
[...]
Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\*.*"
Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Homepage.lnk"
Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Manager.lnk"
Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Uninstall.lnk"
RMDir "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}"

Delete "$INSTDIR\Uninstall.exe"

RMDir "$INSTDIR"

DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"

!insertmacro MUI_UNFINISHHEADER

SectionEnd


Thank you in advance!
Greetings
Kronos


Please get the latest development version (use NSIS Update) and see the StartMenu.nsi example. The MUI_STARTMENUPAGE_VARIABLE is only for the installer.


THX! I will test it...


Trouble when using Rmdir on the Start Menu Folder
I got quite the same problem as KronosTheFirst with my own installer.

So, I tried with the original StartMenu.nsi file : still the same :
(Extract of StartMenu.nsi)
;Remove shortcut
ReadRegStr ${TEMP} "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"

StrCmp ${TEMP} "" noshortcuts

Delete "$SMPROGRAMS\${TEMP}\Modern UI.lnk"
Delete "$SMPROGRAMS\${TEMP}\Uninstall.lnk"
RMDir "$SMPROGRAMS\${TEMP}" ;Only if empty, so it won't delete other shortcuts
(End of Extract)


When running Uninstall, the entries "C:\Documents and Settings\....\Test Software\*.lnk" are deleted from the Start Menu, but the folder "C:\Documents and Settings\....\Test Software" is not deleted.

When trying to delete it manually, through the Start Menu, or the explorer, I receive a Windows error message "Sharing violation".
When running a file handle explorer, such as the excellent Sysinternals Process Explorer, I find that Explorer has opened an handle which is "C:\Documents and Settings\...\Menu Démarrer\Programmes\Test Software\" (my OS W2K is a french one).
When trying to manually delete the folder, another handle is opened which is "C:\Documents and Settings\...\Menu Démarrer\Programmes\Test Software" (please note the difference : the closing "\").
I then close the first handle (wonderful feature of Process Explorer)
And now it is possible to manually delete the folder.

So, may be this can help you to find out an explanation ?


This problem is not related to the first one (the first script is invalid).

Please download the latest development version, compile StartMenu.nsi, run it and post the result.


Thanks Joost to spend time with my problem, :up:

I already use the last version.
But, in order to be sure, I've redownloaded it again.
NSIS version 2.0 beta 3. (nsis20b3.exe, 1355 Kb)
MakeNSISW v 1.9 (59 Kb, 20 Feb 2002)
makensis.exe (355 Kb, 17 March 2003)
StartMenu.nsi (4 Kb, 14 March 2003)

Same results. Start Menu Folder not deleted after uninstall.
I've tried on another PC. Same thing. But it's also a W2K french one.

I attach a zip file containing my compiled StartMenu.exe as well as some windows screencopies.

I suppose that the example StartMenu.nsi has been already tested by others.
So I just wonder if my exe/uninstall works on other machines than mines (for instance on W2K english versions) ?


The latest version is the development snapshot from http://nsis.sourceforge.net/

-Stu


Sorry, I'm just another blind NSIS newbie.

Now it works fine.

I appreciate that you spent time with me and I'll search better next time.
:confused: