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 <?define FirewallName =
"$(var.ChromotingHost)" ?>
23 <?define OmahaAppid =
"{b210701e-ffc4-49e3-932b-370728c72662}" ?>
24 <?define UpgradeCode =
"2b21f767-e157-4fa6-963c-55834c1433a6" ?>
26 <?define ControllerAppid =
"{4ff35d5e-d226-4550-9248-03e7779e67de}" ?>
27 <?define ControllerBinary =
"remoting_controller.exe" ?>
28 <?define ControllerClass =
"ElevatedController Class" ?>
29 <?define ControllerProgid =
30 "ChromotingElevatedController.ElevatedController" ?>
31 <?define ControllerTypelib =
"{9d9a5a2c-576e-4acd-9c75-aabff74b205d}" ?>
34 The long hex value below is a security descriptor that allows SYSTEM,
35 built-in administrators and interactive users to call methods of a COM
36 object (COM_RIGHTS_EXECUTE and COM_RIGHTS_EXECUTE_LOCAL). The security
37 descriptor was generated from SDDL definition using the PowerShell script
40 $sddl = "O:BAG:BAD:(A;;0x3;;;IU)(A;;0x3;;;SY)(A;;0x3;;;BA)"
41 $i = ([wmiclass]"Win32_SecurityDescriptorHelper").SDDLToBinarySD($sddl).BinarySD
42 -join ($i | foreach {$_.ToString("X2")})
44 <?define ControllerSd =
"010004805C0000006C00000000000000140000000200480003000000000014000300000001010000000000050400000000001400030000000101000000000005120000000000180003000000010200000000000520000000200200000102000000000005200000002002000001020000000000052000000020020000" ?>
46 <?ifndef ControllerClsid
?>
47 <?error ControllerClsid must be defined
?>
51 <?error Version must be defined
?>
56 Manufacturer=
"$(var.Manufacturer)"
57 Name=
"$(var.ChromotingHost)"
58 UpgradeCode=
"$(var.UpgradeCode)"
59 Version=
"$(var.Version)">
61 <Package Comments=
"$(var.ChromotingHost) Package"
63 Description=
"$(var.ChromotingHost) Package"
64 InstallerVersion=
"200"
65 Manufacturer=
"$(var.Manufacturer)"
66 InstallScope=
"perMachine"/>
69 Message=
"$(var.ChromotingHost) is only supported on Windows XP, Windows Server 2003, or higher.">
70 <![CDATA[Installed OR (VersionNT
>=
501)]]
>
73 <!-- The upgrade rules below could be expressed with MajorUpgrade element.
74 Unfortunately, there is a bug in WiX decompiler (Dark) corrupting
75 InstallExecuteSequence table. The installation compiled from
76 the disassembled .msi schedules RemoveExistingProducts after
77 InstallFinalize while the original installation schedules it after
78 InstallInitialize. Fortunately, the verbose version of the upgrade
79 rules below decompiles correctly, so we use it instead.
80 See http://crbug.com/145265 for more details.
82 <Upgrade Id=
"$(var.UpgradeCode)">
83 <UpgradeVersion IncludeMinimum=
"no"
84 Minimum=
"$(var.Version)"
86 Property=
"NEWERVERSIONDETECTED" />
87 <UpgradeVersion IncludeMaximum=
"yes"
89 Maximum=
"$(var.Version)"
91 Property=
"OLDERVERSIONBEINGUPGRADED" />
92 <!-- Detect versions that didn't handle the usagestats value properly. -->
93 <UpgradeVersion IncludeMaximum=
"yes"
95 Maximum=
"24.0.1312.29"
97 Property=
"BROKENUSAGESTATSVERSION" />
100 <Condition Message=
"A later version of [ProductName] is already installed. Setup will now exit.">
101 NOT NEWERVERSIONDETECTED
104 <Media Id=
"1" Cabinet=
"chromoting.cab" EmbedCab=
"yes"/>
106 <Directory Id=
"TARGETDIR" Name=
"SourceDir">
107 <Directory Id=
"ProgramFilesFolder">
108 <?if $(var.OfficialBuild) !=
0 ?>
109 <Directory Id=
"program_files_google" Name=
"Google">
110 <Directory Id=
"chromoting" Name=
"Chrome Remote Desktop">
111 <Directory Id=
"binaries" Name=
"$(var.Version)"/>
115 <Directory Id=
"chromoting" Name=
"Chromoting">
116 <Directory Id=
"binaries" Name=
"$(var.Version)"/>
120 <Directory Id=
"CommonAppDataFolder">
121 <?if $(var.OfficialBuild) !=
0 ?>
122 <Directory Id=
"common_app_data_google" Name=
"Google">
123 <Directory Id=
"config_files" Name=
"Chrome Remote Desktop"/>
126 <Directory Id=
"config_files" Name=
"Chromoting"/>
131 <DirectoryRef Id=
"binaries">
132 <Component Id=
"sas" Guid=
"*">
139 <?if $(var.RemotingMultiProcess) !=
0 ?>
140 <Component Id=
"remoting_desktop" Guid=
"*">
141 <File Id=
"remoting_desktop.exe"
144 Name=
"remoting_desktop.exe"
149 <Component Id=
"remoting_daemon" Guid=
"*">
150 <File Id=
"remoting_daemon.exe"
153 Name=
"remoting_daemon.exe"
156 <ServiceInstall Id=
"install_service"
159 Name=
"$(var.ServiceName)"
160 DisplayName=
"[chromoting_service_display_name]"
161 Description=
"[chromoting_service_description]"
162 Arguments=
"--host-config="[config_files]host.json""
164 Account=
"LocalSystem"
165 ErrorControl=
"ignore"
168 <ServiceControl Id=
"start_service"
171 Name=
"$(var.ServiceName)"
175 <Component Id=
"remoting_host" Guid=
"*">
176 <File Id=
"remoting_host.exe"
178 Name=
"remoting_host.exe"
180 <util:EventSource xmlns:
util=
"http://schemas.microsoft.com/wix/UtilExtension"
181 Name=
"$(var.EventSourceName)"
184 CategoryMessageFile=
"[#remoting_host.exe]"
185 EventMessageFile=
"[#remoting_host.exe]"
187 SupportsInformationals=
"yes"/>
189 <fire:FirewallException xmlns:
fire=
"http://schemas.microsoft.com/wix/FirewallExtension"
190 Id=
"me2me_firewall_exception"
192 Name=
"$(var.FirewallName)"
194 Program=
"[#remoting_host.exe]"
198 <?if $(var.OfficialBuild) !=
0 ?>
199 <Component Id=
"omaha_registration" Guid=
"*">
200 <RegistryKey Id=
"omaha_client_key"
202 Key=
"SOFTWARE\Google\Update\Clients\$(var.OmahaAppid)"
204 <RegistryValue Type=
"string"
206 Value=
"$(var.Version)"/>
208 <RegistryValue Type=
"string"
210 Value=
"$(var.ChromotingHost)"/>
215 <Component Id=
"remoting_controller" Guid=
"*">
216 <File Id=
"$(var.ControllerBinary)"
218 Name=
"$(var.ControllerBinary)"
221 <RegistryKey Root=
"HKLM"
222 Key=
"SOFTWARE\Classes">
223 <RegistryKey Key=
"AppId">
224 <RegistryKey Key=
"$(var.ControllerAppid)" Action=
"create">
225 <RegistryValue Type=
"string"
226 Value=
"ChromotingElevatedController"/>
227 <RegistryValue Name=
"AccessPermission"
229 Value=
"$(var.ControllerSd)"/>
232 <RegistryKey Key=
"$(var.ControllerBinary)" Action=
"create">
233 <RegistryValue Type=
"string"
235 Value=
"$(var.ControllerAppid)"/>
239 <RegistryKey Key=
"$(var.ControllerProgid)" Action=
"create">
240 <RegistryValue Type=
"string"
241 Value=
"$(var.ControllerClass)"/>
243 <RegistryKey Key=
"CLSID" Action=
"create">
244 <RegistryValue Type=
"string"
245 Value=
"$(var.ControllerClsid)"/>
248 <RegistryKey Key=
"CurVer" Action=
"create">
249 <RegistryValue Type=
"string"
250 Value=
"$(var.ControllerProgid).$(var.Version)"/>
254 <RegistryKey Key=
"$(var.ControllerProgid).$(var.Version)"
256 <RegistryValue Type=
"string"
257 Value=
"$(var.ControllerClass)"/>
259 <RegistryKey Key=
"CLSID" Action=
"create">
260 <RegistryValue Type=
"string"
261 Value=
"$(var.ControllerClsid)"/>
265 <RegistryKey Key=
"CLSID">
266 <RegistryKey Key=
"$(var.ControllerClsid)" Action=
"create">
267 <RegistryValue Type=
"string"
268 Value=
"$(var.ControllerClass)"/>
270 <RegistryValue Type=
"string"
272 Value=
"$(var.ControllerAppid)"/>
274 <RegistryValue Type=
"string"
275 Name=
"LocalizedString"
276 Value=
"@[#$(var.ControllerBinary)],-100"/>
278 <RegistryKey Key=
"LocalServer32" Action=
"create">
279 <RegistryValue Type=
"string"
280 Value=
"[#$(var.ControllerBinary)]"/>
283 <RegistryKey Key=
"ProgID" Action=
"create">
284 <RegistryValue Type=
"string"
285 Value=
"$(var.ControllerProgid).$(var.Version)"/>
288 <RegistryKey Key=
"TypeLib" Action=
"create">
289 <RegistryValue Type=
"string"
290 Value=
"$(var.ControllerTypelib)"/>
293 <RegistryKey Key=
"VersionIndependentProgID" Action=
"create">
294 <RegistryValue Type=
"string"
295 Value=
"$(var.ControllerProgid)"/>
298 <RegistryKey Key=
"Elevation" Action=
"create">
299 <RegistryValue Type=
"integer"
302 <RegistryValue Type=
"string"
304 Value=
"@[#$(var.ControllerBinary)],-101"/>
309 <RegistryKey Key=
"Interface">
310 <RegistryKey Key=
"{655bd819-c08c-4b04-80c2-f160739ff6ef}"
312 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
313 <RegistryValue Type=
"string"
314 Value=
"{00020424-0000-0000-C000-000000000046}"/>
317 <RegistryKey Key=
"TypeLib" Action=
"create">
318 <RegistryValue Type=
"string"
319 Value=
"$(var.ControllerTypelib)"/>
323 <RegistryKey Key=
"{e051a481-6345-4ba1-bdb1-cf7929955268}"
325 <RegistryKey Key=
"ProxyStubClsid32" Action=
"create">
326 <RegistryValue Type=
"string"
327 Value=
"{00020424-0000-0000-C000-000000000046}"/>
330 <RegistryKey Key=
"TypeLib" Action=
"create">
331 <RegistryValue Type=
"string"
332 Value=
"$(var.ControllerTypelib)"/>
337 <RegistryKey Key=
"Typelib">
338 <RegistryKey Key=
"$(var.ControllerTypelib)" Action=
"create">
339 <RegistryKey Key=
"1.1" Action=
"create">
340 <RegistryKey Key=
"0" Action=
"create">
341 <RegistryKey Key=
"win32" Action=
"create">
342 <RegistryValue Type=
"string"
343 Value=
"[#$(var.ControllerBinary)]"/>
347 <RegistryKey Key=
"FLAGS" Action=
"create">
348 <RegistryValue Type=
"string"
352 <RegistryKey Key=
"HELPDIR" Action=
"create">
353 <RegistryValue Type=
"string"
363 <!-- Register with Sawbuck. See http://code.google.com/p/sawbuck/. -->
364 <Component Id=
"sawbuck_provider" Guid=
"*">
365 <RegistryKey Root=
"HKLM"
366 Key=
"SOFTWARE\Google\Sawbuck\Providers">
367 <RegistryKey Key=
"{2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}"
369 <RegistryValue Type=
"string" Value=
"Chromoting"/>
370 <RegistryValue Name=
"default_flags" Type=
"integer" Value=
"1"/>
371 <RegistryValue Name=
"default_level" Type=
"integer" Value=
"4"/>
372 <RegistryKey Key=
"Flags" Action=
"create">
373 <RegistryKey Key=
"Stack Trace" Action=
"create">
374 <RegistryValue Type=
"integer" Value=
"1"/>
376 <RegistryKey Key=
"Text Only" Action=
"create">
377 <RegistryValue Type=
"integer" Value=
"2"/>
384 <!-- Delete the usagestats flag to reset the crash dump reporting settings
385 for existing users. -->
386 <Component Id=
"delete_usagestats"
387 Guid=
"5c73f2b9-b865-426f-81cc-90a27ebb54aa"
389 <Condition>BROKENUSAGESTATSVERSION
</Condition>
392 Key=
"SOFTWARE\Google\Update\ClientStateMedium\$(var.OmahaAppid)"
399 <DirectoryRef Id=
"config_files">
400 <!-- Delete debug.log from previous versions -->
401 <Component Id=
"delete_debug_log"
402 Guid=
"b309082a-e6fa-4dc7-98e4-3d83c896561d">
403 <RemoveFile Id=
"debug.log"
409 <!-- The service is always installed in the stopped state with start type
410 set to 'manual'. This becomes a problem when upgrading an existing
411 installation that is configured to start the service automatically.
413 Here we check the startup type before making any changes, then restart
414 the service and change its startup type as needed once the installation
416 <Property Id=
"CHROMOTING_SERVICE_START_TYPE">
417 <RegistrySearch Id=
"chromoting_service_start_type"
419 Key=
"SYSTEM\CurrentControlSet\services\$(var.ServiceName)"
424 <CustomAction Id=
"query_auto_start_service"
425 Property=
"auto_start_service"
426 Value=
"[CHROMOTING_SERVICE_START_TYPE]" />
428 <CustomAction Id=
"set_auto_start_service"
433 var controller = new ActiveXObject(
"$(var.ControllerProgid)");
434 controller.StartDaemon();
438 <CustomAction Id=
"set_service_display_name"
439 Property=
"chromoting_service_display_name"
440 Value=
"@[binaries]remoting_daemon.exe,-101" />
441 <CustomAction Id=
"set_service_description"
442 Property=
"chromoting_service_description"
443 Value=
"@[binaries]remoting_daemon.exe,-102" />
445 <!-- XP does not support MUI strings in the service name and description, so
446 we fall back to plain strings on XP. -->
447 <CustomAction Id=
"set_service_display_name_xp"
448 Property=
"chromoting_service_display_name"
449 Value=
"$(var.ChromotingServiceName)" />
450 <CustomAction Id=
"set_service_description_xp"
451 Property=
"chromoting_service_description"
452 Value=
"$(var.ChromotingServiceDescription)" />
454 <UIRef Id=
"WixUI_ErrorProgressText" />
456 <Feature Id=
"chromoting_host" Level=
"1" Title=
"$(var.ChromotingHost)">
457 <ComponentRef Id=
"delete_debug_log"/>
458 <ComponentRef Id=
"delete_usagestats"/>
459 <?if $(var.OfficialBuild) !=
0 ?>
460 <ComponentRef Id=
"omaha_registration"/>
462 <ComponentRef Id=
"remoting_controller"/>
463 <ComponentRef Id=
"remoting_daemon"/>
464 <?if $(var.RemotingMultiProcess) !=
0 ?>
465 <ComponentRef Id=
"remoting_desktop"/>
467 <ComponentRef Id=
"remoting_host"/>
468 <ComponentRef Id=
"sas"/>
469 <ComponentRef Id=
"sawbuck_provider"/>
472 <!-- Set the icon shown in Add/Remove Programs. -->
473 <Icon Id=
"chromoting.ico" SourceFile=
"chromoting.ico"/>
474 <Property Id=
"ARPPRODUCTICON" Value=
"chromoting.ico" />
476 <InstallExecuteSequence>
477 <Custom Action=
"query_auto_start_service" Before=
"InstallInitialize"/>
478 <Custom Action=
"set_auto_start_service" After=
"StartServices">
479 <![CDATA[NOT REMOVE AND (auto_start_service =
"#2")]]
>
482 <!-- Set the serivce name and description -->
483 <Custom Action=
"set_service_display_name_xp" Before=
"InstallInitialize">
484 <![CDATA[VersionNT <
600]]
>
486 <Custom Action=
"set_service_description_xp" Before=
"InstallInitialize">
487 <![CDATA[VersionNT <
600]]
>
489 <Custom Action=
"set_service_display_name" Before=
"InstallInitialize">
490 <![CDATA[VersionNT
>=
600]]
>
492 <Custom Action=
"set_service_description" Before=
"InstallInitialize">
493 <![CDATA[VersionNT
>=
600]]
>
496 <!-- Schedule RemoveExistingProducts before installing any files.
497 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. -->
498 <RemoveExistingProducts After=
"InstallInitialize" />
499 </InstallExecuteSequence>