Commit 2573c4d1 authored by Joe Downing's avatar Joe Downing Committed by Commit Bot

Create a symbolic link for latest Chromoting install

This CL updates our WXS file to create a symbolic link which
points to the newly installed directory (or removes the
symbolic link on uninstall).

This link can be used to make Windows-specific instructions easier
to follow, for example you can now specify this instead of requiring
the user to figure out the current version of the host:
"%ProgramFiles(x86)%\Chromoting\CurrentVersion\remoting_start_host.exe"

Note: I marked the actions as 'ignore return value' as I don't think
we would want to fail to install the package if the link couldn't be
created.  Ignoring the rmdir output simplifies the command as we
don't need to check if the link exists before trying to remove it.

Change-Id: I3f0df29b3549bd998eac9d517245f8822db4ec66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028118
Commit-Queue: Joe Downing <joedow@chromium.org>
Auto-Submit: Joe Downing <joedow@chromium.org>
Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736550}
parent a8cd2495
......@@ -752,6 +752,20 @@
Property="REINSTALLMODE"
Value="amus" />
<CustomAction Id="make_symbolic_link"
Directory="chromoting"
ExeCommand='cmd /c mklink /d CurrentVersion ".\$(var.Version)\"'
Execute="deferred"
Impersonate="no"
Return="ignore"/>
<CustomAction Id="remove_symbolic_link"
Directory="chromoting"
ExeCommand='cmd /c rmdir CurrentVersion'
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. -->
......@@ -778,6 +792,9 @@
<!-- Schedule RemoveExistingProducts before installing any files.
See http://msdn.microsoft.com/en-us/library/aa371197.aspx. -->
<RemoveExistingProducts After="InstallInitialize" />
<Custom Action="remove_symbolic_link" Before="RemoveFiles"/>
<Custom Action="make_symbolic_link" After="InstallFiles"/>
</InstallExecuteSequence>
</Product>
</Wix>
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