Prevent 'files in use' error when installing CRD host MSI [chromium/src : master]

23 views
Skip to first unread message

Joe Downing (Gerrit)

unread,
Dec 11, 2020, 10:34:15 PM12/11/20
to Jamie Walch, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org

Attention is currently required from: Jamie Walch.

View Change

1 comment:

To view, visit change 2587619. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Ia6355942acb154eaabf2b2a7d84a5250e9d1a1c1
Gerrit-Change-Number: 2587619
Gerrit-PatchSet: 1
Gerrit-Owner: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Jamie Walch <jamie...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Attention: Jamie Walch <jamie...@chromium.org>
Gerrit-Comment-Date: Sat, 12 Dec 2020 03:33:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Jamie Walch (Gerrit)

unread,
Dec 14, 2020, 12:46:09 PM12/14/20
to Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org

Attention is currently required from: Joe Downing.

Patch set 1:Code-Review +1

View Change

    To view, visit change 2587619. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia6355942acb154eaabf2b2a7d84a5250e9d1a1c1
    Gerrit-Change-Number: 2587619
    Gerrit-PatchSet: 1
    Gerrit-Owner: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Jamie Walch <jamie...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Attention: Joe Downing <joe...@chromium.org>
    Gerrit-Comment-Date: Mon, 14 Dec 2020 17:45:44 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Joe Downing (Gerrit)

    unread,
    Dec 14, 2020, 2:28:15 PM12/14/20
    to Jamie Walch, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org

    Attention is currently required from: Joe Downing.

    Patch set 1:Commit-Queue +2

    View Change

      To view, visit change 2587619. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia6355942acb154eaabf2b2a7d84a5250e9d1a1c1
      Gerrit-Change-Number: 2587619
      Gerrit-PatchSet: 1
      Gerrit-Owner: Joe Downing <joe...@chromium.org>
      Gerrit-Reviewer: Jamie Walch <jamie...@chromium.org>
      Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
      Gerrit-Attention: Joe Downing <joe...@chromium.org>
      Gerrit-Comment-Date: Mon, 14 Dec 2020 19:27:46 +0000

      Chromium LUCI CQ (Gerrit)

      unread,
      Dec 14, 2020, 2:58:00 PM12/14/20
      to Joe Downing, Jamie Walch, chromium...@chromium.org, chromotin...@chromium.org

      Chromium LUCI CQ submitted this change.

      View Change

      Approvals: Jamie Walch: Looks good to me Joe Downing: Commit
      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/+/2587619
      Reviewed-by: Jamie Walch <jamie...@chromium.org>
      Commit-Queue: Joe Downing <joe...@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#836725}
      ---
      M remoting/host/installer/win/chromoting.wxs
      1 file changed, 21 insertions(+), 0 deletions(-)

      diff --git a/remoting/host/installer/win/chromoting.wxs b/remoting/host/installer/win/chromoting.wxs
      index 8053e4e..1ba89e25 100644
      --- a/remoting/host/installer/win/chromoting.wxs
      +++ b/remoting/host/installer/win/chromoting.wxs
      @@ -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>

      To view, visit change 2587619. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia6355942acb154eaabf2b2a7d84a5250e9d1a1c1
      Gerrit-Change-Number: 2587619
      Gerrit-PatchSet: 2
      Gerrit-Owner: Joe Downing <joe...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Jamie Walch <jamie...@chromium.org>
      Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages