Skip to content
⌘ NSIS Forum Archive

Uninstall Start Menu Problem

6 posts

alan93#

Uninstall Start Menu Problem

I searched for this but didn't really find any clear cut solutions.

I also looked at StartMenu.nsi but coulnd't understand it because there are very few comments as to what the commands do.

I am not doing a start menu page.

I just want to remove the program shortcuts off of the start menu that were created with "CreateShortCut" commmand.

Is there an easy way to do this?

thanks
lewellyn#
I'm not sure if it's correct or not, but it works for me... 😉

In a Section, I have:

    CreateShortCut "$SMPROGRAMS\Quickstart\Business Card Maker.lnk" "$INSTDIR\Business Card Maker\Quickstart Business Card Maker Pro.exe" 
And then, in my Uninstall Section, I have:

    Delete "$SMPROGRAMS\Quickstart\Business Card Maker.lnk" 
Hope that helps. (And if I'm wrong, I hope someone corrects me so I don't keep doing it this way!)

--Matt
alan93#
I tried that earlier with "SetShellVarContext All" but it didn't seem to work. Took this out and it seems works now.

The problem now is that the each .lnk in the group gets deleted but the group remains in the program list. How do you delete the group?

CreateShortCut "$SMPROGRAMS\My Program Group\History.txt.lnk" "$INSTDIR\History.txt"

delete "$SMPROGRAMS\My Program Group\History.txt.lnk"


My Program Group remains ...?
lewellyn#
I do:

    RMDir "$SMPROGRAMS\Quickstart" ;Only if empty, so it won't delete other shortcuts 
Again, it works for me (tm), but it may not be the "correct" way of doing it...
lewellyn#
Well, the folders in the start menu really are just directories. And shortcuts are just a file... No such thing as ln(1) here! 😉