alan93
8th November 2003 01:49 UTC
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
8th November 2003 02:54 UTC
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
8th November 2003 03:06 UTC
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
8th November 2003 03:09 UTC
I do:
RMDir "$SMPROGRAMS\Quickstart" ;Only if empty, so it wont delete other shortcuts
>
Again, it works for me (tm), but it may not be the "correct" way of doing it...
alan93
8th November 2003 03:13 UTC
Oooooooook
Great that works, wasn't thinking of a short cut being a dir.
thanks
lewellyn
8th November 2003 05:14 UTC
Well, the folders in the start menu really are just directories. And shortcuts are just a file... No such thing as ln(1) here! ;)