diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-30 18:35:58 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-30 20:19:50 +0200 |
commit | 6bbce9b8d13456e2a0961a40ac8c7cbe78199bae (patch) | |
tree | 4c3b882b2c864927b83d87835aa437365d742758 /installer/wireguard.wxs | |
parent | service: inform UIs it is time to quit so they can kill tray (diff) | |
download | wireguard-windows-6bbce9b8d13456e2a0961a40ac8c7cbe78199bae.tar.xz wireguard-windows-6bbce9b8d13456e2a0961a40ac8c7cbe78199bae.zip |
installer: stop/uninstall/start all WireGuard services
Also clean up quite a few things.
Signed-off-by: Simon Rozman <simon@rozman.si>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'installer/wireguard.wxs')
-rw-r--r-- | installer/wireguard.wxs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/installer/wireguard.wxs b/installer/wireguard.wxs index da31c3c6..3d4766dc 100644 --- a/installer/wireguard.wxs +++ b/installer/wireguard.wxs @@ -27,12 +27,13 @@ <MediaTemplate EmbedCab="yes" CompressionLevel="high"/> <Icon Id="icon.ico" SourceFile="..\ui\icon\icon.ico"/> + <Binary Id="ca.js" SourceFile="ca.js"/> <Property Id="ARPPRODUCTICON" Value="icon.ico"/> <Property Id="ARPURLINFOABOUT" Value="https://www.wireguard.com/"/> - <Property Id="ARPNOREPAIR" Value="yes" /> <Property Id="ARPNOMODIFY" Value="yes" /> <Property Id="DISABLEADVTSHORTCUTS" Value="yes"/> + <Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" /> <!-- Upgrading @@ -75,9 +76,7 @@ <File Source="..\$(var.Platform)\wireguard.exe" KeyPath="yes"> <Shortcut Id="WireGuardStartMenuShortcut" Directory="ProgramMenuFolder" Name="WireGuard" Description="WireGuard: Fast, Modern, Secure VPN Tunnel" WorkingDirectory="INSTALLFOLDER" Advertise="yes" /> </File> - <ServiceControl Id="RemoveWireGuardManagerService" Name="WireGuardManager" Remove="both" Stop="both"></ServiceControl> - <ServiceControl Id="RemoveWireGuardTunnelServices" Name="WireGuardTunnel$test" Remove="both" Stop="both"></ServiceControl> - <!-- TODO: "test" is just a temporary hack. We need to enumerate all services that are "WireGuardTunnel$*" and remove those. --> + <ServiceControl Id="DummyService.3AA0C492_29F4_4342_B608_DB95B2DECB13" Name="DummyService.3AA0C492_29F4_4342_B608_DB95B2DECB13"></ServiceControl><!-- A dummy to make WiX create ServiceControl table for us. --> </Component> </ComponentGroup> @@ -99,6 +98,14 @@ </Feature> <!-- + Evaluate WireGuard services and populate ServiceControl table + --> + <CustomAction Id="EvaluateWireGuardServices" BinaryKey="ca.js" JScriptCall="EvaluateWireGuardServices"/> + <InstallExecuteSequence> + <Custom Action="EvaluateWireGuardServices" After="FindRelatedProducts"/> + </InstallExecuteSequence> + + <!-- Launch wireguard.exe after setup complete --> <CustomAction Id="LaunchApplication" HideTarget="yes" Impersonate="no" Execute="deferred" FileKey="wireguard.exe" ExeCommand="" Return="asyncNoWait"/> |