Archive: Setting the name of the uninstaller in the temp directory?


Setting the name of the uninstaller in the temp directory?
So here is the problem I am encountering, I am running the uninstaller of a package, on a Vista box. I recently changed this so we only elevated privileges if the user is an Administrator. Standard users in this case are denied the ability to uninstall.

This all works fine, except for one thing, the name the uninstaller chooses when it copies itself to the temporary directory. Currently this name is "AU_.exe", however this is the executable which gets it's privileges elevated, and this is the name that shows up in the Vista elevation dialog.

It would be nicer if I could specify this somehow, however I haven't seen this. If I can't specify it, it would be good if I could disable the autocopy of the uninstaller, and handle this myself.


It seems that the name of uninstaller in temp directory is certain, you can't change the name.


Copy the installer there yourself and execute it with _?=$INSTDIR

http://nsis.sourceforge.net/When_I_u...he_uninstaller

Stu


Right that won't work because the user will be running the uninstaller from the Add/Remove control panel.


RequestExecutionLevel admin (will affect installer aswell)

The UAC plugin has this exact problem, it does the copy _?= trick in the AU_.exe instance of the installer (really ugly)

Feature request to fix this @ http://sourceforge.net/tracker/index...49&atid=373088


A better solution would probably be for nsis to use the original file name, but I'm sure there is a reason why it does not, maybe kichik knows


Yeah I guess I'll look into the making another copy solution for my own needs. Better than having another "uninstaller.exe" which runs the real uninstaller.


How about having your real uninstall.exe embedded in an NSIS installer which itself is called uninstall.exe. That can extract the main one (or WriteUninstaller) to whatever name is required.

Stu