Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nsis uninstaller doesn't remove links

I have this issue: in the installer sections I have this;

Section "Start Menu Shortcuts"
    SetShellVarContext current
    CreateDirectory "$SMPROGRAMS\myProgram"
    CreateShortCut "$SMPROGRAMS\myProgram\myProgram.lnk" "$INSTDIR\myProgram.exe" 
    CreateShortCut "$SMPROGRAMS\myProgram\Uninstall myProgram.lnk" "$INSTDIR\myProgram-Uninstall.exe"
SectionEnd

Section "Desktop Shortcut"
    SetShellVarContext current
    CreateShortCut "$DESKTOP\myProgram.lnk" "$INSTDIR\myProgram.exe"
SectionEnd

and it works fine, I have the icon on the desktop and the icon plus the uninstall icon on the start\programs... tree

the uninstaller section is like this:

SetShellVarContext current
Delete "$DESKTOP\myProgram.lnk"
Delete "$SMPROGRAMS\myProgram\myProgram.lnk"
Delete "$SMPROGRAMS\myProgram\Uninstall myProgram.lnk"
RMDir "$SMPROGRAMS\myProgram"

and the desktop link was deleted, but the other folder with the links not.. any ideas?

the folder where is stored is this (i'm on win 7 64 bits):

C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
like image 651
ghiboz Avatar asked Feb 25 '13 15:02

ghiboz


1 Answers

Do you have RequestExecutionLevel in your script? Without it Windows might do some compatibility hacks with your shortcuts.

If that does not help, try Process Monitor, it might be able to shed some light on the issue...

like image 196
Anders Avatar answered Oct 07 '22 13:10

Anders