Start Menu Uninstall Question
Hello Everyone,
I am creating an installer that is very basic, just copying files. I am using multiple sections, and multiple start menu folders.
I am having trouble having the uninstaller remove any of the start menu sub folders. All of the links get deleted, as well as the files, but the sub-folders in the start menu remain.
Here are c&p from the nsi:
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER\Title Block"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Title Block\PartDiagnoseProgram.lnk" "$INSTDIR\Title Block\PartDiagnoseProgram.ppt"
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER\Part Diagnose"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Part Diagnose\PartDiagnose.lnk" "$INSTDIR\Excel Notes\PartDiagnose.zip"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
*****************************
I have tried 2 different ways to get the sub-folders in the start menu to delete
*****************************
1st try:
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors startMenuDeleteLoopDone
StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:
2nd try:
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP\Part Diagnose"
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP\Excel Notes"
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP\Title Block"
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors startMenuDeleteLoopDone
StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:
What am I missing? - Thanks for your time!