Old 16th September 2010, 18:05   #1
davekr
Junior Member
 
Join Date: Aug 2007
Posts: 4
Repair in Add/Remove Programs

Hi All,

I've got a NSIS installer that I want to add repair support to. I have set NoRepair=0 in the registry so the Repair button shows up in Add/Remove Programs -> support information, but I don't know what value to create to point to my exe so it gets run when the user clicks Repair.

Does anyone know if this is possible with NSIS? I did a search here and found a few old threads, but none of them seem to have been resolved. One of the threads suggested defining ModifyPath, but that does nothing when the Repair button is clicked.

Any suggestions?

Thanks!
Dave
davekr is offline   Reply With Quote
Old 16th September 2010, 20:32   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
You would need to lie to Windows and create the following value in your ARP information.
(DWORD)WindowsInstaller=1

Unfortunately this also makes the ARP applet actually invoke the Windows Installer (msiexec).. which of course won't work here.

It's one of many ways that Microsoft has been pushing people to use the Windows Installer - as now you have no choice but to use a kludgy solution instead.. letting the user 'remove' your product, but then actually present to the user a dialog that asks them what they -really- want to do.
Animaether is offline   Reply With Quote
Old 16th September 2010, 20:38   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You could also put in the DisplayName "(repair or uninstall)".

Stu
Afrow UK is offline   Reply With Quote
Old 16th September 2010, 20:47   #4
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Quote:
Originally Posted by Afrow UK View Post
You could also put in the DisplayName "(repair or uninstall)".
Right - but that is cosmetic and while it does clarify to the user that the entry offers both choices, the Applet itself will still only have the 'Remove' button shown/enabled/etc.
( I use SAFARP, so I'm not entirely too sure what ARP looks like these Win7 days )

MSFT could have easily let other installers be supported by these methods; but alas.

I suppose.. if you -really- wanted to.. you could grab WiX and make a near-empty shell MSI installer which gets handled by the msiexec, and would launch your -actual- NSIS installer/uninstaller. ( or so I presume )
Animaether is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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