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 $(sys.BUILDARCH) =
"x64" ?>
22 <?define ProgramFilesFolderForPlatform =
"ProgramFiles64Folder" ?>
24 <?define ProgramFilesFolderForPlatform =
"ProgramFilesFolder" ?>
27 <?if $(var.OfficialBuild) !=
0 ?>
28 <?define ChromotingKeyPath =
"Google\Chrome Remote Desktop" ?>
30 <?define ChromotingKeyPath =
"Chromoting" ?>
33 <?define FirewallName =
"$(var.ChromotingHost)" ?>
35 <?define OmahaAppid =
"{b210701e-ffc4-49e3-932b-370728c72662}" ?>
36 <?define UpgradeCode =
"2b21f767-e157-4fa6-963c-55834c1433a6" ?>
38 <?define CoreBinary =
"remoting_core.dll" ?>
39 <?define HostBinary =
"remoting_host.exe" ?>
41 <?define ChromotingTypelib =
"{b6396c45-b0cc-456b-9f49-f12964ee6df4}" ?>
43 <!-- AppIDs used by the COM components. -->
44 <?define RdpAppid =
"{52e6fd1a-f16e-49c0-aacb-5436a915448b}" ?>
46 <?define IRdpDesktopSessionId =
"{6a7699f0-ee43-43e7-aa30-a6738f9bd470}" ?>
47 <?define IRdpDesktopSessionEventHandlerId =
48 "{b59b96da-83cb-40ee-9b91-c377400fc3e3}" ?>
51 The long hex value(s) below are security descriptors generated from SDDL
52 definition using the PowerShell script below:
54 $sddl = "<SDDL definition goes here>"
55 $i = ([wmiclass]"Win32_SecurityDescriptorHelper").SDDLToBinarySD($sddl).BinarySD
56 -join ($i | foreach {$_.ToString("X2")})
60 A security descriptor that gives SYSTEM, built-in administrators and
61 LocalService accounts COM_RIGHTS_EXECUTE, COM_RIGHTS_EXECUTE_LOCAL, and
62 COM_RIGHTS_ACTIVATE_LOCAL rights. It specifies a mandatory label that
63 specifies "no execute up" policy for medium integrity level.
65 $sddl = "O:BAG:BAD:(A;;0xb;;;SY)(A;;0xb;;;BA)(A;;0xb;;;LS)S:(ML;;NX;;;ME)"
67 <?define RdpSd =
"010014807800000088000000140000003000000002001C000100000011001400040000000101000000000010002000000200480003000000000014000B000000010100000000000512000000000018000B00000001020000000000052000000020020000000014000B0000000101000000000005130000000102000000000005200000002002000001020000000000052000000020020000" ?>
69 <!-- Verify that all required parameters are defined. -->
70 <?ifndef RdpDesktopSessionClsid
?>
71 <?error RdpDesktopSessionClsid must be defined
?>
75 <?error Version must be defined
?>
80 Manufacturer=
"$(var.Manufacturer)"
81 Name=
"$(var.ChromotingHost)"
82 UpgradeCode=
"$(var.UpgradeCode)"
83 Version=
"$(var.Version)">
85 <Package Comments=
"$(var.ChromotingHost) Package"
87 Description=
"$(var.ChromotingHost) Package"
88 InstallerVersion=
"200"
89 Manufacturer=
"$(var.Manufacturer)"
90 InstallScope=
"perMachine"/>
92 <PropertyRef Id=
"WIX_ACCOUNT_LOCALSYSTEM" />
93 <PropertyRef Id=
"WIX_ACCOUNT_ADMINISTRATORS" />
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=
"$(var.ProgramFilesFolderForPlatform)">
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.RdpAppid)" Action=
"create">
297 <RegistryValue Type=
"string"
298 Value=
"ChromotingRdpDesktopSession"/>
299 <RegistryValue Name=
"AccessPermission"
301 Value=
"$(var.RdpSd)"/>
302 <RegistryValue Name=
"LaunchPermission"
304 Value=
"$(var.RdpSd)"/>
305 <RegistryValue Name=
"RunAs"
307 Value=
"NT AUTHORITY\LocalService"/>
312 <RegistryKey Key=
"CLSID">
313 <RegistryKey Key=
"$(var.RdpDesktopSessionClsid)" Action=
"create">
314 <RegistryValue Type=
"string"
315 Value=
"RdpDesktopSession Class"/>
317 <RegistryValue Type=
"string"
319 Value=
"$(var.RdpAppid)"/>
321 <RegistryKey Key=
"LocalServer32" Action=
"create">
322 <RegistryValue Type=
"string"
323 Value=
"[binaries]$(var.HostBinary) --type=rdp_desktop_session"/>
326 <RegistryKey Key=
"TypeLib" Action=
"create">
327 <RegistryValue Type=
"string"
328 Value=
"$(var.ChromotingTypelib)"/>
332 <!-- IRdpDesktopSession PSFactory -->
333 <RegistryKey Key=
"$(var.IRdpDesktopSessionId)"
335 <RegistryValue Type=
"string"
336 Value=
"IRdpDesktopSession PSFactory"/>
338 <RegistryKey Key=
"InprocServer32" Action=
"create">
339 <RegistryValue Type=
"string"
340 Value=
"[binaries]$(var.CoreBinary)"/>
344 <!-- IRdpDesktopSessionEventHandler PSFactory -->
345 <RegistryKey Key=
"$(var.IRdpDesktopSessionEventHandlerId)"
347 <RegistryValue Type=
"string"
348 Value=
"IRdpDesktopSessionEventHandler PSFactory"/>
350 <RegistryKey Key=
"InprocServer32" Action=
"create">
351 <RegistryValue Type=
"string"
352 Value=
"[binaries]$(var.CoreBinary)"/>
357 <RegistryKey Key=
"Interface">
358 <!-- IDaemonControl2 interface -->
359 <RegistryKey Key=
"{655bd819-c08c-4b04-80c2-f160739ff6ef}"
361 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
362 <RegistryValue Type=
"string"
363 Value=
"{00020424-0000-0000-C000-000000000046}"/>
366 <RegistryKey Key=
"TypeLib" Action=
"create">
367 <RegistryValue Type=
"string"
368 Value=
"$(var.ChromotingTypelib)"/>
372 <!-- IDaemonControl interface -->
373 <RegistryKey Key=
"{e051a481-6345-4ba1-bdb1-cf7929955268}"
375 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
376 <RegistryValue Type=
"string"
377 Value=
"{00020424-0000-0000-C000-000000000046}"/>
380 <RegistryKey Key=
"TypeLib" Action=
"create">
381 <RegistryValue Type=
"string"
382 Value=
"$(var.ChromotingTypelib)"/>
386 <!-- IRdpDesktopSession interface -->
387 <RegistryKey Key=
"$(var.IRdpDesktopSessionId)"
389 <RegistryValue Type=
"string"
390 Value=
"IRdpDesktopSession"/>
391 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
392 <RegistryValue Type=
"string"
393 Value=
"$(var.IRdpDesktopSessionId)"/>
397 <!-- IRdpDesktopSessionEventHandler interface -->
398 <RegistryKey Key=
"$(var.IRdpDesktopSessionEventHandlerId)"
400 <RegistryValue Type=
"string"
401 Value=
"IRdpDesktopSessionEventHandler"/>
402 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
403 <RegistryValue Type=
"string"
404 Value=
"$(var.IRdpDesktopSessionEventHandlerId)"/>
407 <RegistryKey Key=
"TypeLib" Action=
"create">
408 <RegistryValue Type=
"string"
409 Value=
"$(var.ChromotingTypelib)"/>
414 <RegistryKey Key=
"Typelib">
415 <RegistryKey Key=
"$(var.ChromotingTypelib)" Action=
"create">
416 <RegistryKey Key=
"1.0" Action=
"create">
417 <RegistryValue Type=
"string"
418 Value=
"Chromoting 1.0 Type Library"/>
419 <RegistryKey Key=
"0" Action=
"create">
420 <RegistryKey Key=
"win32" Action=
"create">
421 <RegistryValue Type=
"string"
422 Value=
"[binaries]$(var.CoreBinary)"/>
426 <RegistryKey Key=
"FLAGS" Action=
"create">
427 <RegistryValue Type=
"string"
431 <RegistryKey Key=
"HELPDIR" Action=
"create">
432 <RegistryValue Type=
"string"
442 <!-- Creates the pairing registry store and protect it with an ACL. -->
443 <Component Id=
"remoting_pairing_registry" Guid=
"960bc7eb-a816-428b-90e8-ad13336955d5">
444 <RegistryKey Root=
"HKLM"
445 Key=
"SOFTWARE\$(var.ChromotingKeyPath)\paired-clients"
447 <RegistryKey Key=
"clients" Action=
"create"/>
448 <RegistryKey Key=
"secrets" Action=
"create">
449 <!-- Gives full access to SYSTEM only. -->
450 <!-- Cannot use the builtin PermissionEx element because it maps
451 to the MsiLockPermissionsEx table which is not supported on
452 Windows Installer version 4.5 or lower. Also Cannot use
453 PermissionEx in WixUtilExtension because it automatically
454 inherits all the ACLs from the parent. -->
455 <Permission User=
"[WIX_ACCOUNT_LOCALSYSTEM]"
457 ChangePermission=
"yes"
458 TakeOwnership=
"yes"/>
459 <Permission User=
"[WIX_ACCOUNT_ADMINISTRATORS]"
461 ChangePermission=
"yes"
462 TakeOwnership=
"yes"/>
468 <Component Id=
"native_messaging_host_registry" Guid=
"*">
469 <RegistryKey Root=
"HKLM"
470 Key=
"SOFTWARE\Google\chrome\NativeMessagingHosts"
472 <RegistryKey Key=
"com.google.chrome.remote_desktop" Action=
"create">
475 Value=
"[binaries]com.google.chrome.remote_desktop.json"/>
481 <Component Id=
"remote_assistance_host_registry" Guid=
"*">
482 <RegistryKey Root=
"HKLM"
483 Key=
"SOFTWARE\Google\chrome\NativeMessagingHosts"
485 <RegistryKey Key=
"com.google.chrome.remote_assistance"
489 Value=
"[binaries]com.google.chrome.remote_assistance.json"/>
495 <!-- Delete the usagestats flag to reset the crash dump reporting settings
496 for existing users. -->
497 <Component Id=
"delete_usagestats"
498 Guid=
"5c73f2b9-b865-426f-81cc-90a27ebb54aa"
500 <Condition>BROKENUSAGESTATSVERSION
</Condition>
503 Key=
"SOFTWARE\Google\Update\ClientStateMedium\$(var.OmahaAppid)"
510 <!-- Register with Sawbuck. See http://code.google.com/p/sawbuck/. -->
511 <DirectoryRef Id=
"TARGETDIR">
512 <Component Id=
"sawbuck_provider" Guid=
"*" Win64=
"no">
513 <RegistryKey Root=
"HKLM"
514 Key=
"SOFTWARE\Google\Sawbuck\Providers">
515 <RegistryKey Key=
"{2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}"
517 <RegistryValue Type=
"string" Value=
"Chromoting"/>
518 <RegistryValue Name=
"default_flags" Type=
"integer" Value=
"1"/>
519 <RegistryValue Name=
"default_level" Type=
"integer" Value=
"4"/>
520 <RegistryKey Key=
"Flags" Action=
"create">
521 <RegistryKey Key=
"Stack Trace" Action=
"create">
522 <RegistryValue Type=
"integer" Value=
"1"/>
524 <RegistryKey Key=
"Text Only" Action=
"create">
525 <RegistryValue Type=
"integer" Value=
"2"/>
533 <DirectoryRef Id=
"config_files">
534 <!-- Delete debug.log from previous versions -->
535 <Component Id=
"delete_debug_log"
536 Guid=
"b309082a-e6fa-4dc7-98e4-3d83c896561d">
537 <RemoveFile Id=
"debug.log"
543 <!-- The service is always installed in the stopped state with start type
544 set to 'manual'. This becomes a problem when upgrading an existing
545 installation that is configured to start the service automatically.
547 Here we check the startup type before making any changes, then restart
548 the service as needed once the installation is finished. -->
549 <Property Id=
"CHROMOTING_SERVICE_START_TYPE">
550 <RegistrySearch Id=
"chromoting_service_start_type"
552 Key=
"SYSTEM\CurrentControlSet\services\$(var.ServiceName)"
557 <CustomAction Id=
"query_auto_start_service"
558 Property=
"auto_start_service"
559 Value=
"[CHROMOTING_SERVICE_START_TYPE]" />
561 <CustomAction Id=
"start_chromoting_service"
566 var ADS_SERVICE_STOPPED =
0x00000001;
567 var service = GetObject(
"WinNT://./$(var.ServiceName),Service");
568 if (service.Status == ADS_SERVICE_STOPPED) {
574 <CustomAction Id=
"set_service_display_name"
575 Property=
"chromoting_service_display_name"
576 Value=
"@[binaries]$(var.CoreBinary),-101" />
577 <CustomAction Id=
"set_service_description"
578 Property=
"chromoting_service_description"
579 Value=
"@[binaries]$(var.CoreBinary),-102" />
581 <!-- XP does not support MUI strings in the service name and description, so
582 we fall back to plain strings on XP. -->
583 <CustomAction Id=
"set_service_display_name_xp"
584 Property=
"chromoting_service_display_name"
585 Value=
"$(var.ChromotingServiceName)" />
586 <CustomAction Id=
"set_service_description_xp"
587 Property=
"chromoting_service_description"
588 Value=
"$(var.ChromotingServiceDescription)" />
590 <UIRef Id=
"WixUI_ErrorProgressText" />
592 <Feature Id=
"chromoting_host" Level=
"1" Title=
"$(var.ChromotingHost)">
593 <ComponentRef Id=
"delete_debug_log"/>
594 <ComponentRef Id=
"delete_usagestats"/>
595 <?if $(var.OfficialBuild) !=
0 ?>
596 <ComponentRef Id=
"omaha_registration"/>
598 <ComponentRef Id=
"icudtl"/>
599 <ComponentRef Id=
"native_messaging_host_manifest"/>
600 <ComponentRef Id=
"native_messaging_host_registry"/>
601 <ComponentRef Id=
"remote_assistance_host"/>
602 <ComponentRef Id=
"remote_assistance_host_manifest"/>
603 <ComponentRef Id=
"remote_assistance_host_registry"/>
604 <ComponentRef Id=
"remoting_native_messaging_host"/>
605 <ComponentRef Id=
"remoting_core"/>
606 <ComponentRef Id=
"remoting_desktop"/>
607 <ComponentRef Id=
"remoting_host"/>
608 <ComponentRef Id=
"remoting_lib"/>
609 <ComponentRef Id=
"remoting_pairing_registry"/>
610 <ComponentRef Id=
"sas"/>
611 <ComponentRef Id=
"sawbuck_provider"/>
614 <!-- Set the icon shown in Add/Remove Programs. -->
615 <Icon Id=
"chromoting.ico" SourceFile=
"chromoting.ico"/>
616 <Property Id=
"ARPPRODUCTICON" Value=
"chromoting.ico" />
618 <InstallExecuteSequence>
619 <Custom Action=
"query_auto_start_service" Before=
"InstallInitialize"/>
620 <Custom Action=
"start_chromoting_service" After=
"StartServices">
621 <![CDATA[NOT REMOVE AND (auto_start_service =
"#2")]]
>
624 <!-- Set the service name and description -->
625 <Custom Action=
"set_service_display_name_xp" Before=
"InstallInitialize">
626 <![CDATA[VersionNT <
600]]
>
628 <Custom Action=
"set_service_description_xp" Before=
"InstallInitialize">
629 <![CDATA[VersionNT <
600]]
>
631 <Custom Action=
"set_service_display_name" Before=
"InstallInitialize">
632 <![CDATA[VersionNT
>=
600]]
>
634 <Custom Action=
"set_service_description" Before=
"InstallInitialize">
635 <![CDATA[VersionNT
>=
600]]
>
638 <!-- Schedule RemoveExistingProducts before installing any files.
639 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. -->
640 <RemoveExistingProducts After=
"InstallInitialize" />
641 </InstallExecuteSequence>