2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
4 <?define EventSourceName = "chromoting" ?>
5 <?define ServiceName = "chromoting" ?>
7 <!-- TODO(alexeypa): There strings should be localized,
8 see http://crbug.com/121785 -->
9 <?if $(var.Branding) ~= Chrome ?>
10 <?define ChromotingHost = "Chrome Remote Desktop Host" ?>
11 <?define ChromotingServiceName = "Chrome Remote Desktop Service" ?>
12 <?define ChromotingServiceDescription = "This service enables incoming connections from Chrome Remote Desktop clients." ?>
13 <?define Manufacturer = "Google Inc." ?>
15 <?define ChromotingHost = "Chromoting Host" ?>
16 <?define ChromotingServiceName = "Chromoting Service" ?>
17 <?define ChromotingServiceDescription = "This service enables incoming connections from Chromoting clients." ?>
18 <?define Manufacturer = "The Chromium Authors" ?>
21 <?if $(var.OfficialBuild) != 0 ?>
22 <?define ChromotingKeyPath = "Google\Chrome Remote Desktop" ?>
24 <?define ChromotingKeyPath = "Chromoting" ?>
27 <?define FirewallName = "$(var.ChromotingHost)" ?>
29 <?define OmahaAppid = "{b210701e-ffc4-49e3-932b-370728c72662}" ?>
30 <?define UpgradeCode = "2b21f767-e157-4fa6-963c-55834c1433a6" ?>
32 <?define CoreBinary = "remoting_core.dll" ?>
33 <?define HostBinary = "remoting_host.exe" ?>
35 <?define ChromotingTypelib = "{b6396c45-b0cc-456b-9f49-f12964ee6df4}" ?>
37 <!-- AppIDs used by the COM components. -->
38 <?define ControllerAppid = "{4ff35d5e-d226-4550-9248-03e7779e67de}" ?>
39 <?define RdpAppid = "{52e6fd1a-f16e-49c0-aacb-5436a915448b}" ?>
41 <?define ControllerClass = "ElevatedController Class" ?>
42 <?define ControllerProgid =
43 "ChromotingElevatedController.ElevatedController" ?>
45 <?define IRdpDesktopSessionId = "{6a7699f0-ee43-43e7-aa30-a6738f9bd470}" ?>
46 <?define IRdpDesktopSessionEventHandlerId =
47 "{b59b96da-83cb-40ee-9b91-c377400fc3e3}" ?>
50 The long hex value(s) below are security descriptors generated from SDDL
51 definition using the PowerShell script below:
53 $sddl = "<SDDL definition goes here>"
54 $i = ([wmiclass]"Win32_SecurityDescriptorHelper").SDDLToBinarySD($sddl).BinarySD
55 -join ($i | foreach {$_.ToString("X2")})
59 A security descriptor that gives SYSTEM, built-in administrators and
60 LocalService accounts COM_RIGHTS_EXECUTE, COM_RIGHTS_EXECUTE_LOCAL, and
61 COM_RIGHTS_ACTIVATE_LOCAL rights. It specifies a mandatory label that
62 specifies "no execute up" policy for medium integrity level.
64 $sddl = "O:BAG:BAD:(A;;0xb;;;SY)(A;;0xb;;;BA)(A;;0xb;;;LS)S:(ML;;NX;;;ME)"
66 <?define RdpSd = "010014807800000088000000140000003000000002001C000100000011001400040000000101000000000010002000000200480003000000000014000B000000010100000000000512000000000018000B00000001020000000000052000000020020000000014000B0000000101000000000005130000000102000000000005200000002002000001020000000000052000000020020000" ?>
68 <!-- Verify that all required parameters are defined. -->
69 <?ifndef ControllerClsid ?>
70 <?error ControllerClsid must be defined ?>
73 <?ifndef RdpDesktopSessionClsid ?>
74 <?error RdpDesktopSessionClsid must be defined ?>
78 <?error Version must be defined ?>
83 Manufacturer="$(var.Manufacturer)"
84 Name="$(var.ChromotingHost)"
85 UpgradeCode="$(var.UpgradeCode)"
86 Version="$(var.Version)">
88 <Package Comments="$(var.ChromotingHost) Package"
90 Description="$(var.ChromotingHost) Package"
91 InstallerVersion="200"
92 Manufacturer="$(var.Manufacturer)"
93 InstallScope="perMachine"/>
95 <PropertyRef Id="WIX_ACCOUNT_LOCALSYSTEM" />
96 <PropertyRef Id="WIX_ACCOUNT_ADMINISTRATORS" />
99 Message="$(var.ChromotingHost) is only supported on Windows XP, Windows Server 2003, or higher.">
100 <![CDATA[Installed OR (VersionNT >= 501)]]>
103 <!-- The upgrade rules below could be expressed with MajorUpgrade element.
104 Unfortunately, there is a bug in WiX decompiler (Dark) corrupting
105 InstallExecuteSequence table. The installation compiled from
106 the disassembled .msi schedules RemoveExistingProducts after
107 InstallFinalize while the original installation schedules it after
108 InstallInitialize. Fortunately, the verbose version of the upgrade
109 rules below decompiles correctly, so we use it instead.
110 See http://crbug.com/145265 for more details.
112 <Upgrade Id="$(var.UpgradeCode)">
113 <UpgradeVersion IncludeMinimum="no"
114 Minimum="$(var.Version)"
116 Property="NEWERVERSIONDETECTED" />
117 <UpgradeVersion IncludeMaximum="yes"
119 Maximum="$(var.Version)"
121 Property="OLDERVERSIONBEINGUPGRADED" />
122 <!-- Detect versions that didn't handle the usagestats value properly. -->
123 <UpgradeVersion IncludeMaximum="yes"
125 Maximum="24.0.1312.29"
127 Property="BROKENUSAGESTATSVERSION" />
130 <Condition Message="A later version of [ProductName] is already installed. Setup will now exit.">
131 NOT NEWERVERSIONDETECTED
134 <Media Id="1" Cabinet="chromoting.cab" EmbedCab="yes"/>
136 <Directory Id="TARGETDIR" Name="SourceDir">
137 <Directory Id="ProgramFilesFolder">
138 <?if $(var.OfficialBuild) != 0 ?>
139 <Directory Id="program_files_google" Name="Google">
140 <Directory Id="chromoting" Name="Chrome Remote Desktop">
141 <Directory Id="binaries" Name="$(var.Version)"/>
145 <Directory Id="chromoting" Name="Chromoting">
146 <Directory Id="binaries" Name="$(var.Version)"/>
150 <Directory Id="CommonAppDataFolder">
151 <?if $(var.OfficialBuild) != 0 ?>
152 <Directory Id="common_app_data_google" Name="Google">
153 <Directory Id="config_files" Name="Chrome Remote Desktop"/>
156 <Directory Id="config_files" Name="Chromoting"/>
161 <DirectoryRef Id="binaries">
162 <Component Id="sas" Guid="*">
169 <Component Id="remoting_core" Guid="*">
170 <File Id="$(var.CoreBinary)"
173 Name="$(var.CoreBinary)"
176 <util:EventSource xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
177 Name="$(var.EventSourceName)"
180 CategoryMessageFile="[#$(var.CoreBinary)]"
181 EventMessageFile="[#$(var.CoreBinary)]"
183 SupportsInformationals="yes"/>
186 <Component Id="remoting_desktop" Guid="*">
187 <File Id="remoting_desktop.exe"
190 Name="remoting_desktop.exe"
194 <Component Id="remoting_native_messaging_host" Guid="*">
195 <File Id="remoting_native_messaging_host.exe"
198 Name="remoting_native_messaging_host.exe"
202 <Component Id="remote_assistance_host" Guid="*">
203 <File Id="remote_assistance_host.exe"
206 Name="remote_assistance_host.exe"
210 <Component Id="native_messaging_host_manifest" Guid="*">
211 <File Id="com.google.chrome.remote_desktop.json"
214 Name="com.google.chrome.remote_desktop.json"
218 <Component Id="remote_assistance_host_manifest" Guid="*">
219 <File Id="com.google.chrome.remote_assistance.json"
222 Name="com.google.chrome.remote_assistance.json"
226 <Component Id="icudtl" Guid="*">
227 <File Id="icudtl.dat"
234 <Component Id="remoting_host" Guid="*">
235 <File Id="remoting_host.exe"
237 Name="remoting_host.exe"
240 <ServiceInstall Id="install_service"
243 Name="$(var.ServiceName)"
244 DisplayName="[chromoting_service_display_name]"
245 Description="[chromoting_service_description]"
246 Arguments="--type=daemon --host-config="[config_files]host.json""
248 Account="LocalSystem"
249 ErrorControl="ignore"
251 <!-- Configure the service to restart after one minute when it
255 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
256 FirstFailureActionType="restart"
257 ResetPeriodInDays="1"
258 RestartServiceDelayInSeconds="60"
259 SecondFailureActionType="restart"
260 ThirdFailureActionType="restart"/>
263 <ServiceControl Id="start_service"
266 Name="$(var.ServiceName)"
269 <fire:FirewallException xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension"
270 Id="me2me_firewall_exception"
272 Name="$(var.FirewallName)"
274 Program="[#remoting_host.exe]"
278 <?if $(var.OfficialBuild) != 0 ?>
279 <Component Id="omaha_registration" Guid="*">
280 <RegistryKey Id="omaha_client_key"
282 Key="SOFTWARE\Google\Update\Clients\$(var.OmahaAppid)"
284 <RegistryValue Type="string"
286 Value="$(var.Version)"/>
288 <RegistryValue Type="string"
290 Value="$(var.ChromotingHost)"/>
295 <Component Id="remoting_lib" Guid="*">
296 <RegistryKey Root="HKLM"
297 Key="SOFTWARE\Classes">
298 <RegistryKey Key="AppId">
299 <RegistryKey Key="$(var.ControllerAppid)" Action="create">
300 <RegistryValue Type="string"
301 Value="ChromotingElevatedController"/>
304 <RegistryKey Key="$(var.RdpAppid)" Action="create">
305 <RegistryValue Type="string"
306 Value="ChromotingRdpDesktopSession"/>
307 <RegistryValue Name="AccessPermission"
309 Value="$(var.RdpSd)"/>
310 <RegistryValue Name="LaunchPermission"
312 Value="$(var.RdpSd)"/>
313 <RegistryValue Name="RunAs"
315 Value="NT AUTHORITY\LocalService"/>
320 <RegistryKey Key="$(var.ControllerProgid)" Action="create">
321 <RegistryValue Type="string"
322 Value="$(var.ControllerClass)"/>
324 <RegistryKey Key="CLSID" Action="create">
325 <RegistryValue Type="string"
326 Value="$(var.ControllerClsid)"/>
329 <RegistryKey Key="CurVer" Action="create">
330 <RegistryValue Type="string"
331 Value="$(var.ControllerProgid).$(var.Version)"/>
335 <RegistryKey Key="$(var.ControllerProgid).$(var.Version)"
337 <RegistryValue Type="string"
338 Value="$(var.ControllerClass)"/>
340 <RegistryKey Key="CLSID" Action="create">
341 <RegistryValue Type="string"
342 Value="$(var.ControllerClsid)"/>
346 <RegistryKey Key="CLSID">
347 <RegistryKey Key="$(var.ControllerClsid)" Action="create">
348 <RegistryValue Type="string"
349 Value="$(var.ControllerClass)"/>
351 <RegistryValue Type="string"
353 Value="$(var.ControllerAppid)"/>
355 <RegistryValue Type="string"
356 Name="LocalizedString"
357 Value="@[binaries]$(var.CoreBinary),-103"/>
359 <RegistryKey Key="LocalServer32" Action="create">
360 <RegistryValue Type="string"
361 Value="[binaries]$(var.HostBinary) --type=controller"/>
364 <RegistryKey Key="ProgID" Action="create">
365 <RegistryValue Type="string"
366 Value="$(var.ControllerProgid).$(var.Version)"/>
369 <RegistryKey Key="TypeLib" Action="create">
370 <RegistryValue Type="string"
371 Value="$(var.ChromotingTypelib)"/>
374 <RegistryKey Key="VersionIndependentProgID" Action="create">
375 <RegistryValue Type="string"
376 Value="$(var.ControllerProgid)"/>
379 <RegistryKey Key="Elevation" Action="create">
380 <RegistryValue Type="integer"
383 <RegistryValue Type="string"
385 Value="@[binaries]$(var.CoreBinary),-104"/>
388 <RegistryKey Key="$(var.RdpDesktopSessionClsid)" Action="create">
389 <RegistryValue Type="string"
390 Value="RdpDesktopSession Class"/>
392 <RegistryValue Type="string"
394 Value="$(var.RdpAppid)"/>
396 <RegistryKey Key="LocalServer32" Action="create">
397 <RegistryValue Type="string"
398 Value="[binaries]$(var.HostBinary) --type=rdp_desktop_session"/>
401 <RegistryKey Key="TypeLib" Action="create">
402 <RegistryValue Type="string"
403 Value="$(var.ChromotingTypelib)"/>
407 <!-- IRdpDesktopSession PSFactory -->
408 <RegistryKey Key="$(var.IRdpDesktopSessionId)"
410 <RegistryValue Type="string"
411 Value="IRdpDesktopSession PSFactory"/>
413 <RegistryKey Key="InprocServer32" Action="create">
414 <RegistryValue Type="string"
415 Value="[binaries]$(var.CoreBinary)"/>
419 <!-- IRdpDesktopSessionEventHandler PSFactory -->
420 <RegistryKey Key="$(var.IRdpDesktopSessionEventHandlerId)"
422 <RegistryValue Type="string"
423 Value="IRdpDesktopSessionEventHandler PSFactory"/>
425 <RegistryKey Key="InprocServer32" Action="create">
426 <RegistryValue Type="string"
427 Value="[binaries]$(var.CoreBinary)"/>
432 <RegistryKey Key="Interface">
433 <!-- IDaemonControl2 interface -->
434 <RegistryKey Key="{655bd819-c08c-4b04-80c2-f160739ff6ef}"
436 <RegistryKey Key="ProxyStubClsid32" Action="create">
437 <RegistryValue Type="string"
438 Value="{00020424-0000-0000-C000-000000000046}"/>
441 <RegistryKey Key="TypeLib" Action="create">
442 <RegistryValue Type="string"
443 Value="$(var.ChromotingTypelib)"/>
447 <!-- IDaemonControl interface -->
448 <RegistryKey Key="{e051a481-6345-4ba1-bdb1-cf7929955268}"
450 <RegistryKey Key="ProxyStubClsid32" Action="create">
451 <RegistryValue Type="string"
452 Value="{00020424-0000-0000-C000-000000000046}"/>
455 <RegistryKey Key="TypeLib" Action="create">
456 <RegistryValue Type="string"
457 Value="$(var.ChromotingTypelib)"/>
461 <!-- IRdpDesktopSession interface -->
462 <RegistryKey Key="$(var.IRdpDesktopSessionId)"
464 <RegistryValue Type="string"
465 Value="IRdpDesktopSession"/>
466 <RegistryKey Key="ProxyStubClsid32" Action="create">
467 <RegistryValue Type="string"
468 Value="$(var.IRdpDesktopSessionId)"/>
472 <!-- IRdpDesktopSessionEventHandler interface -->
473 <RegistryKey Key="$(var.IRdpDesktopSessionEventHandlerId)"
475 <RegistryValue Type="string"
476 Value="IRdpDesktopSessionEventHandler"/>
477 <RegistryKey Key="ProxyStubClsid32" Action="create">
478 <RegistryValue Type="string"
479 Value="$(var.IRdpDesktopSessionEventHandlerId)"/>
482 <RegistryKey Key="TypeLib" Action="create">
483 <RegistryValue Type="string"
484 Value="$(var.ChromotingTypelib)"/>
489 <RegistryKey Key="Typelib">
490 <RegistryKey Key="$(var.ChromotingTypelib)" Action="create">
491 <RegistryKey Key="1.0" Action="create">
492 <RegistryValue Type="string"
493 Value="Chromoting 1.0 Type Library"/>
494 <RegistryKey Key="0" Action="create">
495 <RegistryKey Key="win32" Action="create">
496 <RegistryValue Type="string"
497 Value="[binaries]$(var.CoreBinary)"/>
501 <RegistryKey Key="FLAGS" Action="create">
502 <RegistryValue Type="string"
506 <RegistryKey Key="HELPDIR" Action="create">
507 <RegistryValue Type="string"
517 <!-- Creates the pairing registry store and protect it with an ACL. -->
518 <Component Id="remoting_pairing_registry" Guid="960bc7eb-a816-428b-90e8-ad13336955d5">
519 <RegistryKey Root="HKLM"
520 Key="SOFTWARE\$(var.ChromotingKeyPath)\paired-clients"
522 <RegistryKey Key="clients" Action="create"/>
523 <RegistryKey Key="secrets" Action="create">
524 <!-- Gives full access to SYSTEM only. -->
525 <!-- Cannot use the builtin PermissionEx element because it maps
526 to the MsiLockPermissionsEx table which is not supported on
527 Windows Installer version 4.5 or lower. Also Cannot use
528 PermissionEx in WixUtilExtension because it automatically
529 inherits all the ACLs from the parent. -->
530 <Permission User="[WIX_ACCOUNT_LOCALSYSTEM]"
532 ChangePermission="yes"
533 TakeOwnership="yes"/>
534 <Permission User="[WIX_ACCOUNT_ADMINISTRATORS]"
536 ChangePermission="yes"
537 TakeOwnership="yes"/>
543 <Component Id="native_messaging_host_registry" Guid="*">
544 <RegistryKey Root="HKLM"
545 Key="SOFTWARE\Google\chrome\NativeMessagingHosts"
547 <RegistryKey Key="com.google.chrome.remote_desktop" Action="create">
550 Value="[binaries]com.google.chrome.remote_desktop.json"/>
556 <Component Id="remote_assistance_host_registry" Guid="*">
557 <RegistryKey Root="HKLM"
558 Key="SOFTWARE\Google\chrome\NativeMessagingHosts"
560 <RegistryKey Key="com.google.chrome.remote_assistance"
564 Value="[binaries]com.google.chrome.remote_assistance.json"/>
570 <!-- Register with Sawbuck. See http://code.google.com/p/sawbuck/. -->
571 <Component Id="sawbuck_provider" Guid="*">
572 <RegistryKey Root="HKLM"
573 Key="SOFTWARE\Google\Sawbuck\Providers">
574 <RegistryKey Key="{2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}"
576 <RegistryValue Type="string" Value="Chromoting"/>
577 <RegistryValue Name="default_flags" Type="integer" Value="1"/>
578 <RegistryValue Name="default_level" Type="integer" Value="4"/>
579 <RegistryKey Key="Flags" Action="create">
580 <RegistryKey Key="Stack Trace" Action="create">
581 <RegistryValue Type="integer" Value="1"/>
583 <RegistryKey Key="Text Only" Action="create">
584 <RegistryValue Type="integer" Value="2"/>
591 <!-- Delete the usagestats flag to reset the crash dump reporting settings
592 for existing users. -->
593 <Component Id="delete_usagestats"
594 Guid="5c73f2b9-b865-426f-81cc-90a27ebb54aa"
596 <Condition>BROKENUSAGESTATSVERSION</Condition>
599 Key="SOFTWARE\Google\Update\ClientStateMedium\$(var.OmahaAppid)"
606 <DirectoryRef Id="config_files">
607 <!-- Delete debug.log from previous versions -->
608 <Component Id="delete_debug_log"
609 Guid="b309082a-e6fa-4dc7-98e4-3d83c896561d">
610 <RemoveFile Id="debug.log"
616 <!-- The service is always installed in the stopped state with start type
617 set to 'manual'. This becomes a problem when upgrading an existing
618 installation that is configured to start the service automatically.
620 Here we check the startup type before making any changes, then restart
621 the service and change its startup type as needed once the installation
623 <Property Id="CHROMOTING_SERVICE_START_TYPE">
624 <RegistrySearch Id="chromoting_service_start_type"
626 Key="SYSTEM\CurrentControlSet\services\$(var.ServiceName)"
631 <CustomAction Id="query_auto_start_service"
632 Property="auto_start_service"
633 Value="[CHROMOTING_SERVICE_START_TYPE]" />
635 <CustomAction Id="set_auto_start_service"
640 var controller = new ActiveXObject("$(var.ControllerProgid)");
641 controller.StartDaemon();
645 <CustomAction Id="set_service_display_name"
646 Property="chromoting_service_display_name"
647 Value="@[binaries]$(var.CoreBinary),-101" />
648 <CustomAction Id="set_service_description"
649 Property="chromoting_service_description"
650 Value="@[binaries]$(var.CoreBinary),-102" />
652 <!-- XP does not support MUI strings in the service name and description, so
653 we fall back to plain strings on XP. -->
654 <CustomAction Id="set_service_display_name_xp"
655 Property="chromoting_service_display_name"
656 Value="$(var.ChromotingServiceName)" />
657 <CustomAction Id="set_service_description_xp"
658 Property="chromoting_service_description"
659 Value="$(var.ChromotingServiceDescription)" />
661 <UIRef Id="WixUI_ErrorProgressText" />
663 <Feature Id="chromoting_host" Level="1" Title="$(var.ChromotingHost)">
664 <ComponentRef Id="delete_debug_log"/>
665 <ComponentRef Id="delete_usagestats"/>
666 <?if $(var.OfficialBuild) != 0 ?>
667 <ComponentRef Id="omaha_registration"/>
669 <ComponentRef Id="icudtl"/>
670 <ComponentRef Id="native_messaging_host_manifest"/>
671 <ComponentRef Id="native_messaging_host_registry"/>
672 <ComponentRef Id="remote_assistance_host"/>
673 <ComponentRef Id="remote_assistance_host_manifest"/>
674 <ComponentRef Id="remote_assistance_host_registry"/>
675 <ComponentRef Id="remoting_native_messaging_host"/>
676 <ComponentRef Id="remoting_core"/>
677 <ComponentRef Id="remoting_desktop"/>
678 <ComponentRef Id="remoting_host"/>
679 <ComponentRef Id="remoting_lib"/>
680 <ComponentRef Id="remoting_pairing_registry"/>
681 <ComponentRef Id="sas"/>
682 <ComponentRef Id="sawbuck_provider"/>
685 <!-- Set the icon shown in Add/Remove Programs. -->
686 <Icon Id="chromoting.ico" SourceFile="chromoting.ico"/>
687 <Property Id="ARPPRODUCTICON" Value="chromoting.ico" />
689 <InstallExecuteSequence>
690 <Custom Action="query_auto_start_service" Before="InstallInitialize"/>
691 <Custom Action="set_auto_start_service" After="StartServices">
692 <![CDATA[NOT REMOVE AND (auto_start_service = "#2")]]>
695 <!-- Set the serivce name and description -->
696 <Custom Action="set_service_display_name_xp" Before="InstallInitialize">
697 <![CDATA[VersionNT < 600]]>
699 <Custom Action="set_service_description_xp" Before="InstallInitialize">
700 <![CDATA[VersionNT < 600]]>
702 <Custom Action="set_service_display_name" Before="InstallInitialize">
703 <![CDATA[VersionNT >= 600]]>
705 <Custom Action="set_service_description" Before="InstallInitialize">
706 <![CDATA[VersionNT >= 600]]>
709 <!-- Schedule RemoveExistingProducts before installing any files.
710 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. -->
711 <RemoveExistingProducts After="InstallInitialize" />
712 </InstallExecuteSequence>