Tolwyn
28th May 2003 00:09 UTC
Still Can't Get Start Menu Group to uninstall (delete)
This is obscenely more complicate than it should be.
I have the Start Menu group explicitly defined, yet it will not remove either shortcut OR the group itself.
Even have tried:
RMDir /r "${SMPROGRAMS}\${MUI_PRODUCT}"
Anyone??
Brummelchen
28th May 2003 10:29 UTC
maybe this helps
Insert:
;Configuration
;Remember the Start Menu Folder
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\<yoursoft>"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "StartMenuFolder"
;Installer Sections
!insertmacro MUI_STARTMENU_WRITE_BEGIN
;Create shortcuts
CreateDirectory "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}"
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\<yourapp>.lnk" "$INSTDIR\<yourfile>.ext"
!insertmacro MUI_STARTMENU_WRITE_END
;Uninstaller Section
;must be the first in this sektion
;when you are going to delete the whole key later
; DeleteRegKey HKCU "Software\<yoursoft>"
;Remove shortcuts
Push $R0
;ReadRegStr $R0 HKCU "Software\<yoursoft>" "StartMenuFolder"
ReadRegStr $R0 ${MUI_STARTMENUPAGE_REGISTRY_ROOT} ${MUI_STARTMENUPAGE_REGISTRY_KEY} ${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}
StrCmp $R0 "" noshortcuts
RMDir /r "$SMPROGRAMS\$R0"
Pop $R0
noshortcuts:
replace <yoursoft> with appropriate name
HTH