Archive: How to remove shortcuts from start menu in NSIS?


How to remove shortcuts from start menu in NSIS?
I have created short cut menu using following code.

CreateDirectory "$SMPROGRAMS\myFolder"
CreateShortCut "$SMPROGRAMS\myFolder\app.lnk" "$INSTDIR\app.exe" "" "$INSTDIR\app.exe" 0
CreateShortCut "$SMPROGRAMS\myFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0



The short cut folder created successfully.Also short cut menu created any of start menu folder.like games,accessories and etc,
I have included repair and remove option in this EXE.
PROBLEM:if the user install first time,he select short cut folder under accessories.same user run second time,he selects short cut folder under Games.Now run the uninstall.exe it was remove short cut folder only under the Games.The short cut menu still exists in accessories.How to remove all short cut folder in start menu?


If you want to remove stuff from all previous installations, you need to save the locations during each install. I suggest creating a regkey, where you add a new string of the path for each install. Then in uninstall simply enumerate that regkey and delete stuff.


Thank you.I hope its working.I dont know how to create regkey using nsis.can you tell me how to create regkey?


It's all in the manual, under Registry, INI, File Instructions:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.2.16