Archive: Repair in Add/Remove Programs


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


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.


You could also put in the DisplayName "(repair or uninstall)".

Stu


Originally posted by Afrow UK
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 )