1

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

greenhat
  • 1,061
  • 1
  • 12
  • 19
  • 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 Nov 16 '12 at 00:46
  • https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/patchwork/ – CAD bloke Jan 28 '16 at 20:40
  • How are you getting Wix to restart explorer? I'm trying to get this to work for a icon shell extension installed by Wix, but it doesn't restart explorer, it prompts to close it but fails to restart it. – Tim Calladene Feb 16 '22 at 23:06

2 Answers2

1

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

Community
  • 1
  • 1
MikeBaz - MSFT
  • 2,938
  • 4
  • 28
  • 57
  • hi @MikeBaz. I currently have removeExistingProducts after InstallFinalize. It still trys to change the dll even tho the version on the dll is unchanged.\n Maybe I'm interpreting the symptoms wrong. What we have is a dll that is injected into explorer. Even tho that dll isn't changed, explorer is restarting on upgrade (because restart manager sees the explorer app is holding a reference to something it wants to install). So my interpretation of the explorer-restart-symptom is that msiexec is still trying to install that dll. Marking that component as NeverOverwrite 'fixes' the issue. – greenhat Nov 27 '12 at 19:06
  • Then I'm sorry but I don't have a good answer for you :( Have you tried asking on the WiX mailing list? https://lists.sourceforge.net/lists/listinfo/wix-users The part about doing an Explorer DLL "feels" like an important point but I can't give a reason why. – MikeBaz - MSFT Nov 28 '12 at 17:19
  • Good thought. Done. I'll post back any findings from that forum. – greenhat Nov 28 '12 at 19:08
0

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.

Community
  • 1
  • 1
Alexey Ivanov
  • 11,541
  • 4
  • 39
  • 68
  • hi @AlexeyIvanov. Thnx for the post. Your answer is similar (more detailed) to Mike's post. So same comment here that I made there. basically it doesn't work but I'm not sure why because I think it should. – greenhat Nov 27 '12 at 19:12