Commit 4570f26a authored by Joe Downing's avatar Joe Downing Committed by Chromium LUCI CQ

Prevent 'files in use' error when installing CRD host MSI

When you install the CRD Host MSI and the website is open to either
/access or /support (after generating a code), the install will
appear to be successful but the user will get a warning that they
need to reboot their machine.  This is because although the files
were removed, the website is using the old NMH processes which are
still in memory.

To prevent this error (and to ensure the new NMH are being used),
we can run taskkill as a custom action to close the in-memory
instances of the Me2Me and It2Me native messaging hosts.  This will
prevent the error from being displayed.  The user will needed to
refresh the website if they are in this state, but they won't be
running old code.

Bug: 1003606
Change-Id: Ia6355942acb154eaabf2b2a7d84a5250e9d1a1c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587619Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836725}
parent 905006a8
......@@ -747,6 +747,21 @@
Impersonate="no"
Return="ignore"/>
<!-- Prevents errors during installation time when the website client has an
active native messaging host instance running. -->
<CustomAction Id="kill_me2me_native_message_host"
Directory="binaries"
ExeCommand='cmd /c taskkill /F /IM remoting_native_messaging_host.exe'
Execute="deferred"
Impersonate="no"
Return="ignore"/>
<CustomAction Id="kill_it2me_native_message_host"
Directory="binaries"
ExeCommand='cmd /c taskkill /T /F /IM remote_assistance_host.exe'
Execute="deferred"
Impersonate="no"
Return="ignore"/>
<InstallExecuteSequence>
<!-- Set REINSTALL=all and REINSTALLMODE=amus if the user reruns the
MSI, which will force reinstalling all files and services. -->
......@@ -780,6 +795,12 @@
<Custom Action="remove_symbolic_link" Before="RemoveFiles">
Installed AND (NOT MAINTENANCE)
</Custom>
<Custom Action="kill_it2me_native_message_host" After="InstallInitialize">
Installed
</Custom>
<Custom Action="kill_me2me_native_message_host" After="InstallInitialize">
Installed
</Custom>
<Custom Action="make_symbolic_link" After="InstallFiles">
NOT Installed
</Custom>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment