I came across this problem while testing the uninstall part of an NSIS script:
Despite not changing anything in the
-un.post section that takes care of removing all Start Menu entries:
PHP Code:
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "${D_STARTMENU}"
SMDELOOP:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors SMDELDONE
StrCmp $MUI_TEMP $SMPROGRAMS SMDELDONE SMDELOOP
SMDELDONE:
The uninstaller no longer deletes the last (topmost) entry in the Start Menu. In my attempts to troubleshoot this I discovered that this is not always consistent: Sometimes it deletes and sometimes it doesn't.
So, I decided to place a MessageBox line right after the 'RMDir $MUI_TEMP' line:
PHP Code:
RMDir $MUI_TEMP
MessageBox MB_OK|MB_ICONEXCLAMATION "Removed $MUI_TEMP" ; for debug only
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
And I was surprised to see that this message box is displayed while an
ExecWait from a previous
un.Uninstall section was still in progress...
PHP Code:
ExecWait '"$INSTDIR\vcredist_x86.exe" /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /x vcredist.msi /qb!"" "'
Obviously, something is happening here
in parallel but how could this be?
- Isn't ExecWait supposed to wait?
- Isn't Section -un.post supposed to start after all Section "un.Uninstall"s?
Most importantly: How would you suggest that I solve (or workaround) this problem?
Thanks!