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=
"credits" Guid=
"*">
167 <File Id=
"CREDITS.txt"
173 <Component Id=
"remoting_core" Guid=
"*">
174 <File Id=
"$(var.CoreBinary)"
177 Name=
"$(var.CoreBinary)"
180 <util:EventSource xmlns:
util=
"http://schemas.microsoft.com/wix/UtilExtension"
181 Name=
"$(var.EventSourceName)"
184 CategoryMessageFile=
"[#$(var.CoreBinary)]"
185 EventMessageFile=
"[#$(var.CoreBinary)]"
187 SupportsInformationals=
"yes"/>
190 <Component Id=
"remoting_desktop" Guid=
"*">
191 <File Id=
"remoting_desktop.exe"
194 Name=
"remoting_desktop.exe"
198 <Component Id=
"remoting_native_messaging_host" Guid=
"*">
199 <File Id=
"remoting_native_messaging_host.exe"
202 Name=
"remoting_native_messaging_host.exe"
206 <Component Id=
"remote_assistance_host" Guid=
"*">
207 <File Id=
"remote_assistance_host.exe"
210 Name=
"remote_assistance_host.exe"
214 <Component Id=
"native_messaging_host_manifest" Guid=
"*">
215 <File Id=
"com.google.chrome.remote_desktop.json"
218 Name=
"com.google.chrome.remote_desktop.json"
222 <Component Id=
"remote_assistance_host_manifest" Guid=
"*">
223 <File Id=
"com.google.chrome.remote_assistance.json"
226 Name=
"com.google.chrome.remote_assistance.json"
230 <Component Id=
"icudtl" Guid=
"*">
231 <File Id=
"icudtl.dat"
238 <Component Id=
"remoting_host" Guid=
"*">
239 <File Id=
"remoting_host.exe"
241 Name=
"remoting_host.exe"
244 <ServiceInstall Id=
"install_service"
247 Name=
"$(var.ServiceName)"
248 DisplayName=
"[chromoting_service_display_name]"
249 Description=
"[chromoting_service_description]"
250 Arguments=
"--type=daemon --host-config="[config_files]host.json""
252 Account=
"LocalSystem"
253 ErrorControl=
"ignore"
255 <!-- Configure the service to restart after one minute when it
259 xmlns:
util=
"http://schemas.microsoft.com/wix/UtilExtension"
260 FirstFailureActionType=
"restart"
261 ResetPeriodInDays=
"1"
262 RestartServiceDelayInSeconds=
"60"
263 SecondFailureActionType=
"restart"
264 ThirdFailureActionType=
"restart"/>
267 <ServiceControl Id=
"start_service"
270 Name=
"$(var.ServiceName)"
273 <fire:FirewallException xmlns:
fire=
"http://schemas.microsoft.com/wix/FirewallExtension"
274 Id=
"me2me_firewall_exception"
276 Name=
"$(var.FirewallName)"
278 Program=
"[#remoting_host.exe]"
282 <?if $(var.OfficialBuild) !=
0 ?>
283 <Component Id=
"omaha_registration" Guid=
"*">
284 <RegistryKey Id=
"omaha_client_key"
286 Key=
"SOFTWARE\Google\Update\Clients\$(var.OmahaAppid)"
288 <RegistryValue Type=
"string"
290 Value=
"$(var.Version)"/>
292 <RegistryValue Type=
"string"
294 Value=
"$(var.ChromotingHost)"/>
299 <Component Id=
"remoting_lib" Guid=
"*">
300 <RegistryKey Root=
"HKLM"
301 Key=
"SOFTWARE\Classes">
302 <RegistryKey Key=
"AppId">
303 <RegistryKey Key=
"$(var.RdpAppid)" Action=
"create">
304 <RegistryValue Type=
"string"
305 Value=
"ChromotingRdpDesktopSession"/>
306 <RegistryValue Name=
"AccessPermission"
308 Value=
"$(var.RdpSd)"/>
309 <RegistryValue Name=
"LaunchPermission"
311 Value=
"$(var.RdpSd)"/>
312 <RegistryValue Name=
"RunAs"
314 Value=
"NT AUTHORITY\LocalService"/>
319 <RegistryKey Key=
"CLSID">
320 <RegistryKey Key=
"$(var.RdpDesktopSessionClsid)" Action=
"create">
321 <RegistryValue Type=
"string"
322 Value=
"RdpDesktopSession Class"/>
324 <RegistryValue Type=
"string"
326 Value=
"$(var.RdpAppid)"/>
328 <RegistryKey Key=
"LocalServer32" Action=
"create">
329 <RegistryValue Type=
"string"
330 Value=
"[binaries]$(var.HostBinary) --type=rdp_desktop_session"/>
333 <RegistryKey Key=
"TypeLib" Action=
"create">
334 <RegistryValue Type=
"string"
335 Value=
"$(var.ChromotingTypelib)"/>
339 <!-- IRdpDesktopSession PSFactory -->
340 <RegistryKey Key=
"$(var.IRdpDesktopSessionId)"
342 <RegistryValue Type=
"string"
343 Value=
"IRdpDesktopSession PSFactory"/>
345 <RegistryKey Key=
"InprocServer32" Action=
"create">
346 <RegistryValue Type=
"string"
347 Value=
"[binaries]$(var.CoreBinary)"/>
351 <!-- IRdpDesktopSessionEventHandler PSFactory -->
352 <RegistryKey Key=
"$(var.IRdpDesktopSessionEventHandlerId)"
354 <RegistryValue Type=
"string"
355 Value=
"IRdpDesktopSessionEventHandler PSFactory"/>
357 <RegistryKey Key=
"InprocServer32" Action=
"create">
358 <RegistryValue Type=
"string"
359 Value=
"[binaries]$(var.CoreBinary)"/>
364 <RegistryKey Key=
"Interface">
365 <!-- IDaemonControl2 interface -->
366 <RegistryKey Key=
"{655bd819-c08c-4b04-80c2-f160739ff6ef}"
368 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
369 <RegistryValue Type=
"string"
370 Value=
"{00020424-0000-0000-C000-000000000046}"/>
373 <RegistryKey Key=
"TypeLib" Action=
"create">
374 <RegistryValue Type=
"string"
375 Value=
"$(var.ChromotingTypelib)"/>
379 <!-- IDaemonControl interface -->
380 <RegistryKey Key=
"{e051a481-6345-4ba1-bdb1-cf7929955268}"
382 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
383 <RegistryValue Type=
"string"
384 Value=
"{00020424-0000-0000-C000-000000000046}"/>
387 <RegistryKey Key=
"TypeLib" Action=
"create">
388 <RegistryValue Type=
"string"
389 Value=
"$(var.ChromotingTypelib)"/>
393 <!-- IRdpDesktopSession interface -->
394 <RegistryKey Key=
"$(var.IRdpDesktopSessionId)"
396 <RegistryValue Type=
"string"
397 Value=
"IRdpDesktopSession"/>
398 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
399 <RegistryValue Type=
"string"
400 Value=
"$(var.IRdpDesktopSessionId)"/>
404 <!-- IRdpDesktopSessionEventHandler interface -->
405 <RegistryKey Key=
"$(var.IRdpDesktopSessionEventHandlerId)"
407 <RegistryValue Type=
"string"
408 Value=
"IRdpDesktopSessionEventHandler"/>
409 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
410 <RegistryValue Type=
"string"
411 Value=
"$(var.IRdpDesktopSessionEventHandlerId)"/>
414 <RegistryKey Key=
"TypeLib" Action=
"create">
415 <RegistryValue Type=
"string"
416 Value=
"$(var.ChromotingTypelib)"/>
421 <RegistryKey Key=
"Typelib">
422 <RegistryKey Key=
"$(var.ChromotingTypelib)" Action=
"create">
423 <RegistryKey Key=
"1.0" Action=
"create">
424 <RegistryValue Type=
"string"
425 Value=
"Chromoting 1.0 Type Library"/>
426 <RegistryKey Key=
"0" Action=
"create">
427 <RegistryKey Key=
"win32" Action=
"create">
428 <RegistryValue Type=
"string"
429 Value=
"[binaries]$(var.CoreBinary)"/>
433 <RegistryKey Key=
"FLAGS" Action=
"create">
434 <RegistryValue Type=
"string"
438 <RegistryKey Key=
"HELPDIR" Action=
"create">
439 <RegistryValue Type=
"string"
449 <!-- Creates the pairing registry store and protect it with an ACL. -->
450 <Component Id=
"remoting_pairing_registry" Guid=
"960bc7eb-a816-428b-90e8-ad13336955d5">
451 <RegistryKey Root=
"HKLM"
452 Key=
"SOFTWARE\$(var.ChromotingKeyPath)\paired-clients"
454 <RegistryKey Key=
"clients" Action=
"create"/>
455 <RegistryKey Key=
"secrets" Action=
"create">
456 <!-- Gives full access to SYSTEM only. -->
457 <!-- Cannot use the builtin PermissionEx element because it maps
458 to the MsiLockPermissionsEx table which is not supported on
459 Windows Installer version 4.5 or lower. Also Cannot use
460 PermissionEx in WixUtilExtension because it automatically
461 inherits all the ACLs from the parent. -->
462 <Permission User=
"[WIX_ACCOUNT_LOCALSYSTEM]"
464 ChangePermission=
"yes"
465 TakeOwnership=
"yes"/>
466 <Permission User=
"[WIX_ACCOUNT_ADMINISTRATORS]"
468 ChangePermission=
"yes"
469 TakeOwnership=
"yes"/>
475 <Component Id=
"native_messaging_host_registry" Guid=
"*">
476 <RegistryKey Root=
"HKLM"
477 Key=
"SOFTWARE\Google\chrome\NativeMessagingHosts"
479 <RegistryKey Key=
"com.google.chrome.remote_desktop" Action=
"create">
482 Value=
"[binaries]com.google.chrome.remote_desktop.json"/>
488 <Component Id=
"remote_assistance_host_registry" Guid=
"*">
489 <RegistryKey Root=
"HKLM"
490 Key=
"SOFTWARE\Google\chrome\NativeMessagingHosts"
492 <RegistryKey Key=
"com.google.chrome.remote_assistance"
496 Value=
"[binaries]com.google.chrome.remote_assistance.json"/>
502 <!-- Delete the usagestats flag to reset the crash dump reporting settings
503 for existing users. -->
504 <Component Id=
"delete_usagestats"
505 Guid=
"5c73f2b9-b865-426f-81cc-90a27ebb54aa"
507 <Condition>BROKENUSAGESTATSVERSION
</Condition>
510 Key=
"SOFTWARE\Google\Update\ClientStateMedium\$(var.OmahaAppid)"
517 <!-- Register with Sawbuck. See http://code.google.com/p/sawbuck/. -->
518 <DirectoryRef Id=
"TARGETDIR">
519 <Component Id=
"sawbuck_provider" Guid=
"*" Win64=
"no">
520 <RegistryKey Root=
"HKLM"
521 Key=
"SOFTWARE\Google\Sawbuck\Providers">
522 <RegistryKey Key=
"{2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}"
524 <RegistryValue Type=
"string" Value=
"Chromoting"/>
525 <RegistryValue Name=
"default_flags" Type=
"integer" Value=
"1"/>
526 <RegistryValue Name=
"default_level" Type=
"integer" Value=
"4"/>
527 <RegistryKey Key=
"Flags" Action=
"create">
528 <RegistryKey Key=
"Stack Trace" Action=
"create">
529 <RegistryValue Type=
"integer" Value=
"1"/>
531 <RegistryKey Key=
"Text Only" Action=
"create">
532 <RegistryValue Type=
"integer" Value=
"2"/>
540 <DirectoryRef Id=
"config_files">
541 <!-- Delete debug.log from previous versions -->
542 <Component Id=
"delete_debug_log"
543 Guid=
"b309082a-e6fa-4dc7-98e4-3d83c896561d">
544 <RemoveFile Id=
"debug.log"
550 <!-- The service is always installed in the stopped state with start type
551 set to 'manual'. This becomes a problem when upgrading an existing
552 installation that is configured to start the service automatically.
554 Here we check the startup type before making any changes, then restart
555 the service as needed once the installation is finished. -->
556 <Property Id=
"CHROMOTING_SERVICE_START_TYPE">
557 <RegistrySearch Id=
"chromoting_service_start_type"
559 Key=
"SYSTEM\CurrentControlSet\services\$(var.ServiceName)"
564 <CustomAction Id=
"query_auto_start_service"
565 Property=
"auto_start_service"
566 Value=
"[CHROMOTING_SERVICE_START_TYPE]" />
568 <CustomAction Id=
"start_chromoting_service"
573 var ADS_SERVICE_STOPPED =
0x00000001;
574 var ADS_SERVICE_AUTO_START =
2;
575 var service = GetObject(
"WinNT://./$(var.ServiceName),Service");
576 service.StartType = ADS_SERVICE_AUTO_START;
578 if (service.Status == ADS_SERVICE_STOPPED) {
584 <CustomAction Id=
"set_service_display_name"
585 Property=
"chromoting_service_display_name"
586 Value=
"@[binaries]$(var.CoreBinary),-101" />
587 <CustomAction Id=
"set_service_description"
588 Property=
"chromoting_service_description"
589 Value=
"@[binaries]$(var.CoreBinary),-102" />
591 <!-- XP does not support MUI strings in the service name and description, so
592 we fall back to plain strings on XP. -->
593 <CustomAction Id=
"set_service_display_name_xp"
594 Property=
"chromoting_service_display_name"
595 Value=
"$(var.ChromotingServiceName)" />
596 <CustomAction Id=
"set_service_description_xp"
597 Property=
"chromoting_service_description"
598 Value=
"$(var.ChromotingServiceDescription)" />
600 <UIRef Id=
"WixUI_ErrorProgressText" />
602 <Feature Id=
"chromoting_host" Level=
"1" Title=
"$(var.ChromotingHost)">
603 <ComponentRef Id=
"credits"/>
604 <ComponentRef Id=
"delete_debug_log"/>
605 <ComponentRef Id=
"delete_usagestats"/>
606 <?if $(var.OfficialBuild) !=
0 ?>
607 <ComponentRef Id=
"omaha_registration"/>
609 <ComponentRef Id=
"icudtl"/>
610 <ComponentRef Id=
"native_messaging_host_manifest"/>
611 <ComponentRef Id=
"native_messaging_host_registry"/>
612 <ComponentRef Id=
"remote_assistance_host"/>
613 <ComponentRef Id=
"remote_assistance_host_manifest"/>
614 <ComponentRef Id=
"remote_assistance_host_registry"/>
615 <ComponentRef Id=
"remoting_native_messaging_host"/>
616 <ComponentRef Id=
"remoting_core"/>
617 <ComponentRef Id=
"remoting_desktop"/>
618 <ComponentRef Id=
"remoting_host"/>
619 <ComponentRef Id=
"remoting_lib"/>
620 <ComponentRef Id=
"remoting_pairing_registry"/>
621 <ComponentRef Id=
"sas"/>
622 <ComponentRef Id=
"sawbuck_provider"/>
625 <!-- Set the icon shown in Add/Remove Programs. -->
626 <Icon Id=
"chromoting.ico" SourceFile=
"chromoting.ico"/>
627 <Property Id=
"ARPPRODUCTICON" Value=
"chromoting.ico" />
629 <InstallExecuteSequence>
630 <Custom Action=
"query_auto_start_service" Before=
"InstallInitialize"/>
631 <Custom Action=
"start_chromoting_service" After=
"StartServices">
632 <![CDATA[NOT REMOVE AND (auto_start_service =
"#2")]]
>
635 <!-- Set the service name and description -->
636 <Custom Action=
"set_service_display_name_xp" Before=
"InstallInitialize">
637 <![CDATA[VersionNT <
600]]
>
639 <Custom Action=
"set_service_description_xp" Before=
"InstallInitialize">
640 <![CDATA[VersionNT <
600]]
>
642 <Custom Action=
"set_service_display_name" Before=
"InstallInitialize">
643 <![CDATA[VersionNT
>=
600]]
>
645 <Custom Action=
"set_service_description" Before=
"InstallInitialize">
646 <![CDATA[VersionNT
>=
600]]
>
649 <!-- Schedule RemoveExistingProducts before installing any files.
650 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. -->
651 <RemoveExistingProducts After=
"InstallInitialize" />
652 </InstallExecuteSequence>