2

I'm working on a custom application which contains multiple versions.

When I upgrade the custom application on windows 11, I get a reboot prompt.

When I upgrade the custom application on windows 10, I don't get reboot prompt.

This is using the same installer for the initial install, and the same upgrade installer for the upgrade in both windows 10 and 11.

I am stomped, I have a fix already which had to do with stopping the service and potentially killing the process (never had to so far) which is run in a custom action which is run After="InstallInitialize"

But management wants to know root cause, and I'm not exactly sure. Any help, links, etc appreciated.

Thanks in advance.

user7535144
  • 89
  • 1
  • 3
  • What service? A windows one or your own? – Christopher Painter Oct 22 '21 at 19:03
  • My guess is that the service does not shut down properly in time for the upgrade due to a OS difference - missing runtime or incompatibility, etc... - or there is some unexpected lock that you should check the logs for. Have you checked the system's event log, [the verbose MSI log](https://stackoverflow.com/a/54458890/129130) and enabled any logging your binary supports? Two "ideas lists" - for application launch issues, but it is really general purpose debugging: [list 1](https://stackoverflow.com/a/49637913/129130), [list 2](https://stackoverflow.com/a/53530377/129130). – Stein Åsmul Oct 23 '21 at 00:16
  • Setting REINSTALLMODE=amus (force overwrite files) can trigger unnecessary reboot prompts, as can the mentioned OS incompatibilities affecting proper shutdown of services. There can be missing runtimes, but then a service tends to not start - more likely they are different runtime versions and something weird happens. If a service is not shut down and the MSI tries to upgrade it a reboot prompt WILL show up - that is by design for MSI (correct operation - file can not be replaced, reboot to replace it). – Stein Åsmul Oct 23 '21 at 00:18
  • I would use [Process Explorer](https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer) to check what files your service holds locked. For other tools, please go here: https://installdude.com/jumpgate.php and click the **`"Debugging"`** label (towards top, under search box) and then click **`"Essential Service Tools"`**. – Stein Åsmul Oct 23 '21 at 00:28
  • Its a custom windows service. I'm using wix installer and in the ServiceControl I have stop="both". But with this exact setup, it does not occur in windows 10 or earlier. So I'm lost. Is there some difference in Windows 10 and 11 that I should be made aware of which may be causing this issue? – user7535144 Oct 25 '21 at 14:01
  • What does your log file say? Make sure to make it verbose and look in the event log too. If your WiX source is on github we can have a quick look at it. – Stein Åsmul Oct 25 '21 at 20:55
  • From what I can see in the logs, StopServices is called which stops the service fine. Then when InstallFiles is executed, it says one of the dll is being held. I figure this happens because the process is somehow not ended before the InstallFiles is executed. I do have wait="yes" for the ServiceControl. This only happens on Windows 11, but with some new development ... it happens on Windows 10 21H1 as well. – user7535144 Oct 26 '21 at 19:20

0 Answers0