为什么coluldnot我的安装程序删除开始菜单项?

时间:2013-02-12 09:57:17

标签: nsis

我的安装程序uninstall.exe无法删除开始菜单条目。下面有部分代码可以告诉我哪里错了。

!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "IREC "


 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application



 CreateDirectory "$SMPROGRAMS\${COMPANYNAME}\$startmenufolder"
 CreateShortCut "$SMPROGRAMS\${COMPANYNAME}\$startmenufolder\$(^Name).lnk" "$INSTDIR\eclipse\iREC.exe" 
 CreateShortcut "$SMPROGRAMS\${COMPANYNAME}\$startmenufolder\Uninstall $(^Name).lnk" "$INSTDIR\uninstall.exe"

    SetOutPath "$INSTDIR\eclipse"
    CreateShortCut "$DESKTOP\$(^Name).lnk" "$INSTDIR\eclipse\iREC.exe" 

    !insertmacro MUI_STARTMENU_WRITE_END


DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$registry"
Delete "$SMPROGRAMS\${COMPANYNAME}\$startmenufolder\Uninstall $(^Name).lnk"
Delete  "$SMPROGRAMS\${COMPANYNAME}\$startmenufolder\$(^Name).lnk"

2 个答案:

答案 0 :(得分:0)

您是否尝试过使用SetShellVarContext

答案 1 :(得分:0)