Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 13th March 2008, 01:27   #1
99999999
Junior Member
 
Join Date: Nov 2006
Posts: 43
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.
99999999 is offline   Reply With Quote
Old 13th March 2008, 04:26   #2
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Xi'an, China
Posts: 192
It seems that the name of uninstaller in temp directory is certain, you can't change the name.
jiake is offline   Reply With Quote
Old 13th March 2008, 10:28   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Copy the installer there yourself and execute it with _?=$INSTDIR

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

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 13th March 2008, 19:04   #4
99999999
Junior Member
 
Join Date: Nov 2006
Posts: 43
Right that won't work because the user will be running the uninstaller from the Add/Remove control panel.
99999999 is offline   Reply With Quote
Old 13th March 2008, 19:19   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th March 2008, 19:29   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th March 2008, 19:36   #7
99999999
Junior Member
 
Join Date: Nov 2006
Posts: 43
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.
99999999 is offline   Reply With Quote
Old 14th March 2008, 10:43   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump