Archive: $SMPROGRAMS not in correct place??


$SMPROGRAMS not in correct place??
Hey, I'm new to nsis, and I've been having an issue that I'm not sure how to elegantly resolve.

After install I'm creating a shortcut to our application via:
createShortCut '$SMPROGRAMS\Company\Game.lnk' '$INSTDIR\Game.exe'

Taking a quick look at the value of $SMPROGRAMS, I see the following:
C:\Users\david.DOMAIN\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

However, this isn't where the shortcut gets created. It actually is sitting in the hidden folder:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Company

So now my question comes on uninstallation. If I use the same syntax, ie:
Delete '$SMPROGRAMS\Company\*'
RMDir '$SMPROGRAMS\Company'
The startmenu-program files entry doesn't actually get cleared out. The only way for me to get around this, right now, is to literally enter the location of the shortcut and the shortcut's folder...


say it with me now, Vista Sucks, Vista Sucks...

http://nsis.sourceforge.net/Shortcut..._Windows_Vista


Hey, thanks for the help. That fixed the issue. I'm actually very unfamiliar with the whole privlages system windows has established. Without going into much detail, could you maybe explain to me what the issue was? (I understand the concept of logging in under different credentials)

Also, as a curiosity, I now manually need to create a directory to contain my shortcut. What is the reason behind this?

createShortCut '$SMPROGRAMS\COMPANY\Shortcut.lnk' '$INSTDIR\Executable.exe'

The above line used to create a folder, COMPANY, for me. And now that I've added: RequestExecutionLevel admin, I now need to CreateDirectory '$SMPROGRAMS\COMPANY', first.