WiX / MSI: How to Update a Registered Shell Extension in Windows XP

I have an application that registers a Windows Explorer shell extension.

Application installer developed using WIX.

I uninstall the old product before installing the new one:

RemoveExistingProducts Before="InstallInitialize" 

The problem is that this fails in Windows XP. Not surprising, since the extension is used by Windows Explorer. Of course, it often happens that Windows Explorer does not have a default window, so the Use Files dialog box also does not appear.

So my big question is: what's the best way to update Windows Explorer shell extensions using WiX?

Is there a better solution than ForceReboot ?

Idea: I wrote the NSIS installer some time ago, where I solved a similar problem by renaming the old extension. But what's not possible with WiX, right?

Note. I am asking for Windows XP, since on Vista or higher the reboot manager does a good job.

+4
source share
1 answer

Schedule RemoveExistingProducts immediately before InstallFinalize and the InstallExecute action immediately before RemoveExistingProducts . Not only is this more efficient, it can also replace the file (if it is not locked) and schedule the old file to be deleted at reboot, or schedule a new file to be copied over the old after reboot (both using PendingFileRename).

0
source

Source: https://habr.com/ru/post/1492038/


All Articles