views:

2169

answers:

2

Hi,

I have an installer (NSIS) that creates shortcuts in start menu. When I remove the program uninstall removes the folder from:

C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\

unfortunately the folder is still in start menu. Maybe it's just a matter of refreshing the start menu - but how to do it from NSIS uninstaller?

A: 

I don't have a copy of Windows 7 so I couldn't say for sure, but have you confirmed the folder you removed is the actual one from the start menu (I'm assuming it is since you created it initially).

You could go to the folder in the start menu, right-click, and open it.

Could be a dumb suggestion though. :)

Nick Spacek
Start Menu shortcut points to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\<program_name> which is probably where the start menu options are cached but... after relogin those shortcuts are still there :/ Maybe there's a better way of deleting start shortcuts (while keeping it compatibile with the previous windows versions). As just a note: I didn't have those issues while using WiX
kyrisu
The reason I asked is because in XP and other versions of Windows there are two locations the Start Menu items come from: the user's directory and the "all users" directory.So my thought was that the shortcuts had been created in both but only deleted from one!
Nick Spacek
+1  A: 

Win7 probably sucks as much as Vista and will copy/move the shortcuts to the all users startmenu without telling you. Stop this by using RequestExecutionLevel in your script

See http://nsis.sourceforge.net/Shortcuts_removal_fails_on_Windows_Vista

Anders
Two people down-vote the correct answer with no comments? Anders probably the most knowledgeable NSIS scripter on SO.
Kyle Gagnet
It's the Win7 "bashing" probably. If someone can give me a good reason why NSIS gets this treatment, I'll edit my post.
Anders
Just rewrite it so the correct answer preceeds the bashing.
bobobobo
"Win 7 sucks..." or, maybe, nsis should behave correctly. MSI based installers don't have this problem...
Robert P
@Robert P: Of course MSI has no such issue, since its not even a executable (The real engine is part of the OS) This stupid behavior is for broken installers and since we don't have a time machine, even 100% working (older) installers will break since they don't have the required string in their manifest. MS turns on compatibility hacks for all installers and you have to opt out. (And the opt out method changes for every new version of windows!)
Anders