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"/>
96 Message="$(var.ChromotingHost) is only supported on Windows XP, Windows Server 2003, or higher.">
97 <![CDATA[Installed OR (VersionNT >= 501)]]>
100 <!-- The upgrade rules below could be expressed with MajorUpgrade element.
101 Unfortunately, there is a bug in WiX decompiler (Dark) corrupting
102 InstallExecuteSequence table. The installation compiled from
103 the disassembled .msi schedules RemoveExistingProducts after
104 InstallFinalize while the original installation schedules it after
105 InstallInitialize. Fortunately, the verbose version of the upgrade
106 rules below decompiles correctly, so we use it instead.
107 See http://crbug.com/145265 for more details.
109 <Upgrade Id="$(var.UpgradeCode)">
110 <UpgradeVersion IncludeMinimum="no"
111 Minimum="$(var.Version)"
113 Property="NEWERVERSIONDETECTED" />
114 <UpgradeVersion IncludeMaximum="yes"
116 Maximum="$(var.Version)"
118 Property="OLDERVERSIONBEINGUPGRADED" />
119 <!-- Detect versions that didn't handle the usagestats value properly. -->
120 <UpgradeVersion IncludeMaximum="yes"
122 Maximum="24.0.1312.29"
124 Property="BROKENUSAGESTATSVERSION" />
127 <Condition Message="A later version of [ProductName] is already installed. Setup will now exit.">
128 NOT NEWERVERSIONDETECTED
131 <Media Id="1" Cabinet="chromoting.cab" EmbedCab="yes"/>
133 <Directory Id="TARGETDIR" Name="SourceDir">
134 <Directory Id="ProgramFilesFolder">
135 <?if $(var.OfficialBuild) != 0 ?>
136 <Directory Id="program_files_google" Name="Google">
137 <Directory Id="chromoting" Name="Chrome Remote Desktop">
138 <Directory Id="binaries" Name="$(var.Version)"/>
142 <Directory Id="chromoting" Name="Chromoting">
143 <Directory Id="binaries" Name="$(var.Version)"/>
147 <Directory Id="CommonAppDataFolder">
148 <?if $(var.OfficialBuild) != 0 ?>
149 <Directory Id="common_app_data_google" Name="Google">
150 <Directory Id="config_files" Name="Chrome Remote Desktop"/>
153 <Directory Id="config_files" Name="Chromoting"/>
158 <DirectoryRef Id="binaries">
159 <Component Id="sas" Guid="*">
166 <Component Id="remoting_core" Guid="*">
167 <File Id="$(var.CoreBinary)"
170 Name="$(var.CoreBinary)"
173 <util:EventSource xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
174 Name="$(var.EventSourceName)"
177 CategoryMessageFile="[#$(var.CoreBinary)]"
178 EventMessageFile="[#$(var.CoreBinary)]"
180 SupportsInformationals="yes"/>
183 <Component Id="remoting_desktop" Guid="*">
184 <File Id="remoting_desktop.exe"
187 Name="remoting_desktop.exe"
191 <Component Id="remoting_native_messaging_host" Guid="*">
192 <File Id="remoting_native_messaging_host.exe"
195 Name="remoting_native_messaging_host.exe"
199 <Component Id="remote_assistance_host" Guid="*">
200 <File Id="remote_assistance_host.exe"
203 Name="remote_assistance_host.exe"
207 <Component Id="native_messaging_host_manifest" Guid="*">
208 <File Id="com.google.chrome.remote_desktop.json"
211 Name="com.google.chrome.remote_desktop.json"
215 <Component Id="remote_assistance_host_manifest" Guid="*">
216 <File Id="com.google.chrome.remote_assistance.json"
219 Name="com.google.chrome.remote_assistance.json"
223 <Component Id="icudtl" Guid="*">
224 <File Id="icudtl.dat"
231 <Component Id="remoting_host" Guid="*">
232 <File Id="remoting_host.exe"
234 Name="remoting_host.exe"
237 <ServiceInstall Id="install_service"
240 Name="$(var.ServiceName)"
241 DisplayName="[chromoting_service_display_name]"
242 Description="[chromoting_service_description]"
243 Arguments="--type=daemon --host-config="[config_files]host.json""
245 Account="LocalSystem"
246 ErrorControl="ignore"
248 <!-- Configure the service to restart after one minute when it
252 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
253 FirstFailureActionType="restart"
254 ResetPeriodInDays="1"
255 RestartServiceDelayInSeconds="60"
256 SecondFailureActionType="restart"
257 ThirdFailureActionType="restart"/>
260 <ServiceControl Id="start_service"
263 Name="$(var.ServiceName)"
266 <fire:FirewallException xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension"
267 Id="me2me_firewall_exception"
269 Name="$(var.FirewallName)"
271 Program="[#remoting_host.exe]"
275 <?if $(var.OfficialBuild) != 0 ?>
276 <Component Id="omaha_registration" Guid="*">
277 <RegistryKey Id="omaha_client_key"
279 Key="SOFTWARE\Google\Update\Clients\$(var.OmahaAppid)"
281 <RegistryValue Type="string"
283 Value="$(var.Version)"/>
285 <RegistryValue Type="string"
287 Value="$(var.ChromotingHost)"/>
292 <Component Id="remoting_lib" Guid="*">
293 <RegistryKey Root="HKLM"
294 Key="SOFTWARE\Classes">
295 <RegistryKey Key="AppId">
296 <RegistryKey Key="$(var.ControllerAppid)" Action="create">
297 <RegistryValue Type="string"
298 Value="ChromotingElevatedController"/>
301 <RegistryKey Key="$(var.RdpAppid)" Action="create">
302 <RegistryValue Type="string"
303 Value="ChromotingRdpDesktopSession"/>
304 <RegistryValue Name="AccessPermission"
306 Value="$(var.RdpSd)"/>
307 <RegistryValue Name="LaunchPermission"
309 Value="$(var.RdpSd)"/>
310 <RegistryValue Name="RunAs"
312 Value="NT AUTHORITY\LocalService"/>
317 <RegistryKey Key="$(var.ControllerProgid)" Action="create">
318 <RegistryValue Type="string"
319 Value="$(var.ControllerClass)"/>
321 <RegistryKey Key="CLSID" Action="create">
322 <RegistryValue Type="string"
323 Value="$(var.ControllerClsid)"/>
326 <RegistryKey Key="CurVer" Action="create">
327 <RegistryValue Type="string"
328 Value="$(var.ControllerProgid).$(var.Version)"/>
332 <RegistryKey Key="$(var.ControllerProgid).$(var.Version)"
334 <RegistryValue Type="string"
335 Value="$(var.ControllerClass)"/>
337 <RegistryKey Key="CLSID" Action="create">
338 <RegistryValue Type="string"
339 Value="$(var.ControllerClsid)"/>
343 <RegistryKey Key="CLSID">
344 <RegistryKey Key="$(var.ControllerClsid)" Action="create">
345 <RegistryValue Type="string"
346 Value="$(var.ControllerClass)"/>
348 <RegistryValue Type="string"
350 Value="$(var.ControllerAppid)"/>
352 <RegistryValue Type="string"
353 Name="LocalizedString"
354 Value="@[binaries]$(var.CoreBinary),-103"/>
356 <RegistryKey Key="LocalServer32" Action="create">
357 <RegistryValue Type="string"
358 Value="[binaries]$(var.HostBinary) --type=controller"/>
361 <RegistryKey Key="ProgID" Action="create">
362 <RegistryValue Type="string"
363 Value="$(var.ControllerProgid).$(var.Version)"/>
366 <RegistryKey Key="TypeLib" Action="create">
367 <RegistryValue Type="string"
368 Value="$(var.ChromotingTypelib)"/>
371 <RegistryKey Key="VersionIndependentProgID" Action="create">
372 <RegistryValue Type="string"
373 Value="$(var.ControllerProgid)"/>
376 <RegistryKey Key="Elevation" Action="create">
377 <RegistryValue Type="integer"
380 <RegistryValue Type="string"
382 Value="@[binaries]$(var.CoreBinary),-104"/>
385 <RegistryKey Key="$(var.RdpDesktopSessionClsid)" Action="create">
386 <RegistryValue Type="string"
387 Value="RdpDesktopSession Class"/>
389 <RegistryValue Type="string"
391 Value="$(var.RdpAppid)"/>
393 <RegistryKey Key="LocalServer32" Action="create">
394 <RegistryValue Type="string"
395 Value="[binaries]$(var.HostBinary) --type=rdp_desktop_session"/>
398 <RegistryKey Key="TypeLib" Action="create">
399 <RegistryValue Type="string"
400 Value="$(var.ChromotingTypelib)"/>
404 <!-- IRdpDesktopSession PSFactory -->
405 <RegistryKey Key="$(var.IRdpDesktopSessionId)"
407 <RegistryValue Type="string"
408 Value="IRdpDesktopSession PSFactory"/>
410 <RegistryKey Key="InprocServer32" Action="create">
411 <RegistryValue Type="string"
412 Value="[binaries]$(var.CoreBinary)"/>
416 <!-- IRdpDesktopSessionEventHandler PSFactory -->
417 <RegistryKey Key="$(var.IRdpDesktopSessionEventHandlerId)"
419 <RegistryValue Type="string"
420 Value="IRdpDesktopSessionEventHandler PSFactory"/>
422 <RegistryKey Key="InprocServer32" Action="create">
423 <RegistryValue Type="string"
424 Value="[binaries]$(var.CoreBinary)"/>
429 <RegistryKey Key="Interface">
430 <!-- IDaemonControl2 interface -->
431 <RegistryKey Key="{655bd819-c08c-4b04-80c2-f160739ff6ef}"
433 <RegistryKey Key="ProxyStubClsid32" Action="create">
434 <RegistryValue Type="string"
435 Value="{00020424-0000-0000-C000-000000000046}"/>
438 <RegistryKey Key="TypeLib" Action="create">
439 <RegistryValue Type="string"
440 Value="$(var.ChromotingTypelib)"/>
444 <!-- IDaemonControl interface -->
445 <RegistryKey Key="{e051a481-6345-4ba1-bdb1-cf7929955268}"
447 <RegistryKey Key="ProxyStubClsid32" Action="create">
448 <RegistryValue Type="string"
449 Value="{00020424-0000-0000-C000-000000000046}"/>
452 <RegistryKey Key="TypeLib" Action="create">
453 <RegistryValue Type="string"
454 Value="$(var.ChromotingTypelib)"/>
458 <!-- IRdpDesktopSession interface -->
459 <RegistryKey Key="$(var.IRdpDesktopSessionId)"
461 <RegistryValue Type="string"
462 Value="IRdpDesktopSession"/>
463 <RegistryKey Key="ProxyStubClsid32" Action="create">
464 <RegistryValue Type="string"
465 Value="$(var.IRdpDesktopSessionId)"/>
469 <!-- IRdpDesktopSessionEventHandler interface -->
470 <RegistryKey Key="$(var.IRdpDesktopSessionEventHandlerId)"
472 <RegistryValue Type="string"
473 Value="IRdpDesktopSessionEventHandler"/>
474 <RegistryKey Key="ProxyStubClsid32" Action="create">
475 <RegistryValue Type="string"
476 Value="$(var.IRdpDesktopSessionEventHandlerId)"/>
479 <RegistryKey Key="TypeLib" Action="create">
480 <RegistryValue Type="string"
481 Value="$(var.ChromotingTypelib)"/>
486 <RegistryKey Key="Typelib">
487 <RegistryKey Key="$(var.ChromotingTypelib)" Action="create">
488 <RegistryKey Key="1.0" Action="create">
489 <RegistryValue Type="string"
490 Value="Chromoting 1.0 Type Library"/>
491 <RegistryKey Key="0" Action="create">
492 <RegistryKey Key="win32" Action="create">
493 <RegistryValue Type="string"
494 Value="[binaries]$(var.CoreBinary)"/>
498 <RegistryKey Key="FLAGS" Action="create">
499 <RegistryValue Type="string"
503 <RegistryKey Key="HELPDIR" Action="create">
504 <RegistryValue Type="string"
514 <!-- Creates the pairing registry store and protect it with an ACL. -->
515 <Component Id="remoting_pairing_registry" Guid="960bc7eb-a816-428b-90e8-ad13336955d5">
516 <RegistryKey Root="HKLM"
517 Key="SOFTWARE\$(var.ChromotingKeyPath)\paired-clients"
519 <RegistryKey Key="clients" Action="create"/>
520 <RegistryKey Key="secrets" Action="create">
521 <!-- Gives full access to SYSTEM only. -->
522 <!-- Cannot use the builtin PermissionEx element because it maps
523 to the MsiLockPermissionsEx table which is not supported on
524 Windows Installer version 4.5 or lower. Also Cannot use
525 PermissionEx in WixUtilExtension because it automatically
526 inherits all the ACLs from the parent. -->
527 <Permission User="SYSTEM"
529 ChangePermission="yes"
530 TakeOwnership="yes"/>
531 <Permission User="Administrators"
532 Domain="[LOCAL_MACHINE_NAME]"
534 ChangePermission="yes"
535 TakeOwnership="yes"/>
541 <Component Id="native_messaging_host_registry" Guid="*">
542 <RegistryKey Root="HKLM"
543 Key="SOFTWARE\Google\chrome\NativeMessagingHosts"
545 <RegistryKey Key="com.google.chrome.remote_desktop" Action="create">
548 Value="[binaries]com.google.chrome.remote_desktop.json"/>
554 <Component Id="remote_assistance_host_registry" Guid="*">
555 <RegistryKey Root="HKLM"
556 Key="SOFTWARE\Google\chrome\NativeMessagingHosts"
558 <RegistryKey Key="com.google.chrome.remote_assistance"
562 Value="[binaries]com.google.chrome.remote_assistance.json"/>
568 <!-- Register with Sawbuck. See http://code.google.com/p/sawbuck/. -->
569 <Component Id="sawbuck_provider" Guid="*">
570 <RegistryKey Root="HKLM"
571 Key="SOFTWARE\Google\Sawbuck\Providers">
572 <RegistryKey Key="{2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}"
574 <RegistryValue Type="string" Value="Chromoting"/>
575 <RegistryValue Name="default_flags" Type="integer" Value="1"/>
576 <RegistryValue Name="default_level" Type="integer" Value="4"/>
577 <RegistryKey Key="Flags" Action="create">
578 <RegistryKey Key="Stack Trace" Action="create">
579 <RegistryValue Type="integer" Value="1"/>
581 <RegistryKey Key="Text Only" Action="create">
582 <RegistryValue Type="integer" Value="2"/>
589 <!-- Delete the usagestats flag to reset the crash dump reporting settings
590 for existing users. -->
591 <Component Id="delete_usagestats"
592 Guid="5c73f2b9-b865-426f-81cc-90a27ebb54aa"
594 <Condition>BROKENUSAGESTATSVERSION</Condition>
597 Key="SOFTWARE\Google\Update\ClientStateMedium\$(var.OmahaAppid)"
604 <DirectoryRef Id="config_files">
605 <!-- Delete debug.log from previous versions -->
606 <Component Id="delete_debug_log"
607 Guid="b309082a-e6fa-4dc7-98e4-3d83c896561d">
608 <RemoveFile Id="debug.log"
614 <!-- The service is always installed in the stopped state with start type
615 set to 'manual'. This becomes a problem when upgrading an existing
616 installation that is configured to start the service automatically.
618 Here we check the startup type before making any changes, then restart
619 the service and change its startup type as needed once the installation
621 <Property Id="CHROMOTING_SERVICE_START_TYPE">
622 <RegistrySearch Id="chromoting_service_start_type"
624 Key="SYSTEM\CurrentControlSet\services\$(var.ServiceName)"
629 <CustomAction Id="query_auto_start_service"
630 Property="auto_start_service"
631 Value="[CHROMOTING_SERVICE_START_TYPE]" />
633 <CustomAction Id="set_auto_start_service"
638 var controller = new ActiveXObject("$(var.ControllerProgid)");
639 controller.StartDaemon();
643 <CustomAction Id="set_service_display_name"
644 Property="chromoting_service_display_name"
645 Value="@[binaries]$(var.CoreBinary),-101" />
646 <CustomAction Id="set_service_description"
647 Property="chromoting_service_description"
648 Value="@[binaries]$(var.CoreBinary),-102" />
650 <!-- XP does not support MUI strings in the service name and description, so
651 we fall back to plain strings on XP. -->
652 <CustomAction Id="set_service_display_name_xp"
653 Property="chromoting_service_display_name"
654 Value="$(var.ChromotingServiceName)" />
655 <CustomAction Id="set_service_description_xp"
656 Property="chromoting_service_description"
657 Value="$(var.ChromotingServiceDescription)" />
659 <UIRef Id="WixUI_ErrorProgressText" />
661 <Feature Id="chromoting_host" Level="1" Title="$(var.ChromotingHost)">
662 <ComponentRef Id="delete_debug_log"/>
663 <ComponentRef Id="delete_usagestats"/>
664 <?if $(var.OfficialBuild) != 0 ?>
665 <ComponentRef Id="omaha_registration"/>
667 <ComponentRef Id="icudtl"/>
668 <ComponentRef Id="native_messaging_host_manifest"/>
669 <ComponentRef Id="native_messaging_host_registry"/>
670 <ComponentRef Id="remote_assistance_host"/>
671 <ComponentRef Id="remote_assistance_host_manifest"/>
672 <ComponentRef Id="remote_assistance_host_registry"/>
673 <ComponentRef Id="remoting_native_messaging_host"/>
674 <ComponentRef Id="remoting_core"/>
675 <ComponentRef Id="remoting_desktop"/>
676 <ComponentRef Id="remoting_host"/>
677 <ComponentRef Id="remoting_lib"/>
678 <ComponentRef Id="remoting_pairing_registry"/>
679 <ComponentRef Id="sas"/>
680 <ComponentRef Id="sawbuck_provider"/>
683 <!-- Set the icon shown in Add/Remove Programs. -->
684 <Icon Id="chromoting.ico" SourceFile="chromoting.ico"/>
685 <Property Id="ARPPRODUCTICON" Value="chromoting.ico" />
687 <InstallExecuteSequence>
688 <Custom Action="query_auto_start_service" Before="InstallInitialize"/>
689 <Custom Action="set_auto_start_service" After="StartServices">
690 <![CDATA[NOT REMOVE AND (auto_start_service = "#2")]]>
693 <!-- Set the serivce name and description -->
694 <Custom Action="set_service_display_name_xp" Before="InstallInitialize">
695 <![CDATA[VersionNT < 600]]>
697 <Custom Action="set_service_description_xp" Before="InstallInitialize">
698 <![CDATA[VersionNT < 600]]>
700 <Custom Action="set_service_display_name" Before="InstallInitialize">
701 <![CDATA[VersionNT >= 600]]>
703 <Custom Action="set_service_description" Before="InstallInitialize">
704 <![CDATA[VersionNT >= 600]]>
707 <!-- Schedule RemoveExistingProducts before installing any files.
708 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. -->
709 <RemoveExistingProducts After="InstallInitialize" />
710 </InstallExecuteSequence>