Archive: Uninstall leave Start Menu shortcuts in Vista


Uninstall leave Start Menu shortcuts in Vista
When uninstalling a program by double-clicking on uninstall.exe in teh program folder or on the uninstall shortcut in the start menu, ALL the start menu shortcuts for the program are NOT deleted.

It happens with NSIS 2.21 in Vista RC2 Build 5744

As an example, you can see it happening with example2.exe from the NSIS examples folder


This does not happen for me on one of my builds. Also using build 5744.

However, any exe that is unsigned gets flagged by Vista. Is there a new easy way to sign uninstallers, or would it still be necessary to build them as a separate EXE and bundle them?


Yes, separate bundeling :( makes the build process somehow more cumbersome and not possible on POSIX only systems. I once discussed this in the forum, do not recall where.


It's not a problem with signing, it's a problem with the manifest. Installers which don't have the RequestExecutionLevel manifest will be executed in compatibility mode. Apparently, one of workaround they have implemented is automatically moving shortcuts from the user's start menu to all user's start menu. Either use SetShellVarContext all or RequestExecutionLevel to get around this.


aha, I discovered that I get the following prompt when running the uninstall from the start menu shortcut but not when running it from Add/Remove:
_____

An unidentified program wants access to your computer
uninstall.exe
Unidentified Publisher
_____

(I would have attached a screenshot but couldn't seem to get one from the Vista full screen prompt)

The uninstall shortcut lives under C:\ProgramData\Microsoft\Windows\Start Menu\Programs and was created after using 'SetShellVarContext all'


Sorry, I forgot to mention that the uninstaller worked fine for me when run from Add/Remove programs, it iws "broken" only when I run it from the uninstall shortcut in Start Menu. In my case, I dont see any prompt, the uninstaller just removes everything except the Start Menu program shortcuts and folders.

If I add the manifest, will then I see the prompt asking to run the uninstaller in elevated mode?


Best practice is NOT to have an uninstall shortcut in the start menu in your future installers. I know it is a common practice but IMHO not a good practice.

Uninstalling is much better defined if you just instruct users to go to Controlpanel -> ADD n Remove -> Your XYZ application.

Success

It is even easier for a helpdesk employee to remember.


Oh, and JVS try to use NSIS v2.21 or higher, this might help. Very old NSIS version had an issue with shortcut removal.

Do not forget to SEARCH the forum, it might be of good help to you.


Best practice is NOT to have an uninstall shortcut in the start menu in your future installers. I know it is a common practice but IMHO not a good practice.
Even MSDN is on your side on this one ;)

For me uninstall does not work correctly with Vista.

In Vista Home Premium the uninstall leaves Menu Items (Start | Programs) where they are - even when the uninstall is started from the "control panel add/remove programs".

Is there a fix? Or work around available?

I am using 2.21 of NSIS.


Tested MerryGoRound (125 kB) on Vista Ultimate Release - uninstall worked correct both from Start menu and Control panel, UAC popups both on install and uninstall. RequestExecutionLevel admin, default context (Current User only). Are your paths-links in the uninstall section correct (like this Delete "$SMPROGRAMS\${APP_NAME}\${APP_LNK}")? Can you check this using MessageBox?


DaCzar, see my first response on this thread. Use the latest version of NSIS with RequestExecutionLevel or use SetShellVarContext.


OK

I am not sure at the moment what RequestExecutionLevel is but I will see if I can work it out.

Will report back on how I get on :)


Sorry it seems to be beyond my limited understanding of NSIS. :(

I keeping reading about a manifest, however I cannot find information in the Help file about manifest - what it is, how to access it or change it or even where it is stored.

I get the feeling that setting the default of RequestExecutionLevel to none is something that will have to change.


I have added

RequestExecutionLevel admin

to the top of my script. Will test it tomorrow to see if it works.


It's not in the documentation because you don't have the latest version of NSIS.


I do now ;)

didn't realise a 2.23 version was out


I have added RequestExecutionLevel admin to my script and all
Menu Items (Start | Programs) are now deleting properly in Vista.


Yes this worked for me also. Hooray! One less problem.


Can someone help me with this problem? I'm having the Vista Problem where the uninstaller is not removing the program, folder or shortcuts.

I think the solution is including the RequestExecutionLevel admin function.

If someone can private message me with how to contact them (yahoo messenger, aol IM, etc.) or their email address, I can send them the NSI and I'll pay you for your time.

Thanks