1
votes

I have an installer that installs a dll that ends up getting used by Explorer. Modifying or overwriting that dll requires restarting Explorer which is ugly.

If I increment my Wix ProductVersion (say from 4.0 to 4.1) but don't change any files related to that dll (the dll's version is unchanged) I'd prefer not to have MSI/Wix try to modify that dll. Is there a way to tell MSI/Wix to install only those files which have changed btw the last MSI and the current one being run?

Currently my msi will end up restarting Explorer via Restart Manager since Explorer is holding a file (the dll) in use that Wix wants to change even tho that file hasn't really had any meaningful changes.

Thanks

2
One option that 'works' is setting the NeverOverwrite attribute to 'true' on the dll's component in wix. However I don't think that is the functionality that I really want since at some point I do want to be able to overwrite that component.greenhat

2 Answers

1
votes

Does Brian Gillespie's answer at How to implement WiX installer upgrade? (about scheduling RemoveExistingProducts after InstallFinalize) solve this for you?

0
votes

Do you use upgrade? Try to schedule RemoveExistingProducts after InstallFinalize as suggested by MikeBaz. In this case the new version is installed, and then the old is uninstalled, thus the DLL should remain unchanged if its version did not change.

If RemoveExistingProducts is scheduled before InstallInitialize, the old version is completely uninstalled and then the new version is installed. In this case the DLL has to be removed when the old version is uninstalled, and it's (re-)installed again with the new version.