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 CoreBinary = "remoting_core.dll" ?>
27 <?define HostBinary = "remoting_host.exe" ?>
29 <?define ChromotingTypelib = "{b6396c45-b0cc-456b-9f49-f12964ee6df4}" ?>
31 <!-- AppIDs used by the COM components. -->
32 <?define ControllerAppid = "{4ff35d5e-d226-4550-9248-03e7779e67de}" ?>
33 <?define RdpAppid = "{52e6fd1a-f16e-49c0-aacb-5436a915448b}" ?>
35 <?define ControllerClass = "ElevatedController Class" ?>
36 <?define ControllerProgid =
37 "ChromotingElevatedController.ElevatedController" ?>
39 <?define IRdpDesktopSessionId = "{6a7699f0-ee43-43e7-aa30-a6738f9bd470}" ?>
40 <?define IRdpDesktopSessionEventHandlerId =
41 "{b59b96da-83cb-40ee-9b91-c377400fc3e3}" ?>
44 The long hex value(s) below are security descriptors generated from SDDL
45 definition using the PowerShell script below:
47 $sddl = "<SDDL definition goes here>"
48 $i = ([wmiclass]"Win32_SecurityDescriptorHelper").SDDLToBinarySD($sddl).BinarySD
49 -join ($i | foreach {$_.ToString("X2")})
53 A security descriptor that gives SYSTEM, built-in administrators and
54 LocalService accounts COM_RIGHTS_EXECUTE, COM_RIGHTS_EXECUTE_LOCAL, and
55 COM_RIGHTS_ACTIVATE_LOCAL rights. It specifies a mandatory label that
56 specifies "no execute up" policy for medium integrity level.
58 $sddl = "O:BAG:BAD:(A;;0xb;;;SY)(A;;0xb;;;BA)(A;;0xb;;;LS)S:(ML;;NX;;;ME)"
60 <?define RdpSd = "010014807800000088000000140000003000000002001C000100000011001400040000000101000000000010002000000200480003000000000014000B000000010100000000000512000000000018000B00000001020000000000052000000020020000000014000B0000000101000000000005130000000102000000000005200000002002000001020000000000052000000020020000" ?>
62 <!-- Verify that all required parameters are defined. -->
63 <?ifndef ControllerClsid ?>
64 <?error ControllerClsid must be defined ?>
67 <?ifndef RdpDesktopSessionClsid ?>
68 <?error RdpDesktopSessionClsid must be defined ?>
72 <?error Version must be defined ?>
77 Manufacturer="$(var.Manufacturer)"
78 Name="$(var.ChromotingHost)"
79 UpgradeCode="$(var.UpgradeCode)"
80 Version="$(var.Version)">
82 <Package Comments="$(var.ChromotingHost) Package"
84 Description="$(var.ChromotingHost) Package"
85 InstallerVersion="200"
86 Manufacturer="$(var.Manufacturer)"
87 InstallScope="perMachine"/>
90 Message="$(var.ChromotingHost) is only supported on Windows XP, Windows Server 2003, or higher.">
91 <![CDATA[Installed OR (VersionNT >= 501)]]>
94 <!-- The upgrade rules below could be expressed with MajorUpgrade element.
95 Unfortunately, there is a bug in WiX decompiler (Dark) corrupting
96 InstallExecuteSequence table. The installation compiled from
97 the disassembled .msi schedules RemoveExistingProducts after
98 InstallFinalize while the original installation schedules it after
99 InstallInitialize. Fortunately, the verbose version of the upgrade
100 rules below decompiles correctly, so we use it instead.
101 See http://crbug.com/145265 for more details.
103 <Upgrade Id="$(var.UpgradeCode)">
104 <UpgradeVersion IncludeMinimum="no"
105 Minimum="$(var.Version)"
107 Property="NEWERVERSIONDETECTED" />
108 <UpgradeVersion IncludeMaximum="yes"
110 Maximum="$(var.Version)"
112 Property="OLDERVERSIONBEINGUPGRADED" />
113 <!-- Detect versions that didn't handle the usagestats value properly. -->
114 <UpgradeVersion IncludeMaximum="yes"
116 Maximum="24.0.1312.29"
118 Property="BROKENUSAGESTATSVERSION" />
121 <Condition Message="A later version of [ProductName] is already installed. Setup will now exit.">
122 NOT NEWERVERSIONDETECTED
125 <Media Id="1" Cabinet="chromoting.cab" EmbedCab="yes"/>
127 <Directory Id="TARGETDIR" Name="SourceDir">
128 <Directory Id="ProgramFilesFolder">
129 <?if $(var.OfficialBuild) != 0 ?>
130 <Directory Id="program_files_google" Name="Google">
131 <Directory Id="chromoting" Name="Chrome Remote Desktop">
132 <Directory Id="binaries" Name="$(var.Version)"/>
136 <Directory Id="chromoting" Name="Chromoting">
137 <Directory Id="binaries" Name="$(var.Version)"/>
141 <Directory Id="CommonAppDataFolder">
142 <?if $(var.OfficialBuild) != 0 ?>
143 <Directory Id="common_app_data_google" Name="Google">
144 <Directory Id="config_files" Name="Chrome Remote Desktop"/>
147 <Directory Id="config_files" Name="Chromoting"/>
152 <DirectoryRef Id="binaries">
153 <Component Id="sas" Guid="*">
160 <Component Id="remoting_core" Guid="*">
161 <File Id="$(var.CoreBinary)"
164 Name="$(var.CoreBinary)"
167 <util:EventSource xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
168 Name="$(var.EventSourceName)"
171 CategoryMessageFile="[#$(var.CoreBinary)]"
172 EventMessageFile="[#$(var.CoreBinary)]"
174 SupportsInformationals="yes"/>
177 <Component Id="remoting_desktop" Guid="*">
178 <File Id="remoting_desktop.exe"
181 Name="remoting_desktop.exe"
185 <Component Id="remoting_host" Guid="*">
186 <File Id="remoting_host.exe"
188 Name="remoting_host.exe"
191 <ServiceInstall Id="install_service"
194 Name="$(var.ServiceName)"
195 DisplayName="[chromoting_service_display_name]"
196 Description="[chromoting_service_description]"
197 Arguments="--type=daemon --host-config="[config_files]host.json""
199 Account="LocalSystem"
200 ErrorControl="ignore"
202 <!-- Configure the service to restart after one minute when it
206 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
207 FirstFailureActionType="restart"
208 ResetPeriodInDays="1"
209 RestartServiceDelayInSeconds="60"
210 SecondFailureActionType="restart"
211 ThirdFailureActionType="restart"/>
214 <ServiceControl Id="start_service"
217 Name="$(var.ServiceName)"
220 <fire:FirewallException xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension"
221 Id="me2me_firewall_exception"
223 Name="$(var.FirewallName)"
225 Program="[#remoting_host.exe]"
229 <?if $(var.OfficialBuild) != 0 ?>
230 <Component Id="omaha_registration" Guid="*">
231 <RegistryKey Id="omaha_client_key"
233 Key="SOFTWARE\Google\Update\Clients\$(var.OmahaAppid)"
235 <RegistryValue Type="string"
237 Value="$(var.Version)"/>
239 <RegistryValue Type="string"
241 Value="$(var.ChromotingHost)"/>
246 <Component Id="remoting_lib" Guid="*">
247 <RegistryKey Root="HKLM"
248 Key="SOFTWARE\Classes">
249 <RegistryKey Key="AppId">
250 <RegistryKey Key="$(var.ControllerAppid)" Action="create">
251 <RegistryValue Type="string"
252 Value="ChromotingElevatedController"/>
255 <RegistryKey Key="$(var.RdpAppid)" Action="create">
256 <RegistryValue Type="string"
257 Value="ChromotingRdpDesktopSession"/>
258 <RegistryValue Name="AccessPermission"
260 Value="$(var.RdpSd)"/>
261 <RegistryValue Name="LaunchPermission"
263 Value="$(var.RdpSd)"/>
264 <RegistryValue Name="RunAs"
266 Value="NT AUTHORITY\LocalService"/>
271 <RegistryKey Key="$(var.ControllerProgid)" Action="create">
272 <RegistryValue Type="string"
273 Value="$(var.ControllerClass)"/>
275 <RegistryKey Key="CLSID" Action="create">
276 <RegistryValue Type="string"
277 Value="$(var.ControllerClsid)"/>
280 <RegistryKey Key="CurVer" Action="create">
281 <RegistryValue Type="string"
282 Value="$(var.ControllerProgid).$(var.Version)"/>
286 <RegistryKey Key="$(var.ControllerProgid).$(var.Version)"
288 <RegistryValue Type="string"
289 Value="$(var.ControllerClass)"/>
291 <RegistryKey Key="CLSID" Action="create">
292 <RegistryValue Type="string"
293 Value="$(var.ControllerClsid)"/>
297 <RegistryKey Key="CLSID">
298 <RegistryKey Key="$(var.ControllerClsid)" Action="create">
299 <RegistryValue Type="string"
300 Value="$(var.ControllerClass)"/>
302 <RegistryValue Type="string"
304 Value="$(var.ControllerAppid)"/>
306 <RegistryValue Type="string"
307 Name="LocalizedString"
308 Value="@[binaries]$(var.CoreBinary),-103"/>
310 <RegistryKey Key="LocalServer32" Action="create">
311 <RegistryValue Type="string"
312 Value="[binaries]$(var.HostBinary) --type=controller"/>
315 <RegistryKey Key="ProgID" Action="create">
316 <RegistryValue Type="string"
317 Value="$(var.ControllerProgid).$(var.Version)"/>
320 <RegistryKey Key="TypeLib" Action="create">
321 <RegistryValue Type="string"
322 Value="$(var.ChromotingTypelib)"/>
325 <RegistryKey Key="VersionIndependentProgID" Action="create">
326 <RegistryValue Type="string"
327 Value="$(var.ControllerProgid)"/>
330 <RegistryKey Key="Elevation" Action="create">
331 <RegistryValue Type="integer"
334 <RegistryValue Type="string"
336 Value="@[binaries]$(var.CoreBinary),-104"/>
339 <RegistryKey Key="$(var.RdpDesktopSessionClsid)" Action="create">
340 <RegistryValue Type="string"
341 Value="RdpDesktopSession Class"/>
343 <RegistryValue Type="string"
345 Value="$(var.RdpAppid)"/>
347 <RegistryKey Key="LocalServer32" Action="create">
348 <RegistryValue Type="string"
349 Value="[binaries]$(var.HostBinary) --type=rdp_desktop_session"/>
352 <RegistryKey Key="TypeLib" Action="create">
353 <RegistryValue Type="string"
354 Value="$(var.ChromotingTypelib)"/>
358 <!-- IRdpDesktopSession PSFactory -->
359 <RegistryKey Key="$(var.IRdpDesktopSessionId)"
361 <RegistryValue Type="string"
362 Value="IRdpDesktopSession PSFactory"/>
364 <RegistryKey Key="InprocServer32" Action="create">
365 <RegistryValue Type="string"
366 Value="[binaries]$(var.CoreBinary)"/>
370 <!-- IRdpDesktopSessionEventHandler PSFactory -->
371 <RegistryKey Key="$(var.IRdpDesktopSessionEventHandlerId)"
373 <RegistryValue Type="string"
374 Value="IRdpDesktopSessionEventHandler PSFactory"/>
376 <RegistryKey Key="InprocServer32" Action="create">
377 <RegistryValue Type="string"
378 Value="[binaries]$(var.CoreBinary)"/>
383 <RegistryKey Key="Interface">
384 <!-- IDaemonControl2 interface -->
385 <RegistryKey Key="{655bd819-c08c-4b04-80c2-f160739ff6ef}"
387 <RegistryKey Key="ProxyStubClsid32" Action="create">
388 <RegistryValue Type="string"
389 Value="{00020424-0000-0000-C000-000000000046}"/>
392 <RegistryKey Key="TypeLib" Action="create">
393 <RegistryValue Type="string"
394 Value="$(var.ChromotingTypelib)"/>
398 <!-- IDaemonControl interface -->
399 <RegistryKey Key="{e051a481-6345-4ba1-bdb1-cf7929955268}"
401 <RegistryKey Key="ProxyStubClsid32" Action="create">
402 <RegistryValue Type="string"
403 Value="{00020424-0000-0000-C000-000000000046}"/>
406 <RegistryKey Key="TypeLib" Action="create">
407 <RegistryValue Type="string"
408 Value="$(var.ChromotingTypelib)"/>
412 <!-- IRdpDesktopSession interface -->
413 <RegistryKey Key="$(var.IRdpDesktopSessionId)"
415 <RegistryValue Type="string"
416 Value="IRdpDesktopSession"/>
417 <RegistryKey Key="ProxyStubClsid32" Action="create">
418 <RegistryValue Type="string"
419 Value="$(var.IRdpDesktopSessionId)"/>
423 <!-- IRdpDesktopSessionEventHandler interface -->
424 <RegistryKey Key="$(var.IRdpDesktopSessionEventHandlerId)"
426 <RegistryValue Type="string"
427 Value="IRdpDesktopSessionEventHandler"/>
428 <RegistryKey Key="ProxyStubClsid32" Action="create">
429 <RegistryValue Type="string"
430 Value="$(var.IRdpDesktopSessionEventHandlerId)"/>
433 <RegistryKey Key="TypeLib" Action="create">
434 <RegistryValue Type="string"
435 Value="$(var.ChromotingTypelib)"/>
440 <RegistryKey Key="Typelib">
441 <RegistryKey Key="$(var.ChromotingTypelib)" Action="create">
442 <RegistryKey Key="1.0" Action="create">
443 <RegistryValue Type="string"
444 Value="Chromoting 1.0 Type Library"/>
445 <RegistryKey Key="0" Action="create">
446 <RegistryKey Key="win32" Action="create">
447 <RegistryValue Type="string"
448 Value="[binaries]$(var.CoreBinary)"/>
452 <RegistryKey Key="FLAGS" Action="create">
453 <RegistryValue Type="string"
457 <RegistryKey Key="HELPDIR" Action="create">
458 <RegistryValue Type="string"
468 <!-- Register with Sawbuck. See http://code.google.com/p/sawbuck/. -->
469 <Component Id="sawbuck_provider" Guid="*">
470 <RegistryKey Root="HKLM"
471 Key="SOFTWARE\Google\Sawbuck\Providers">
472 <RegistryKey Key="{2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}"
474 <RegistryValue Type="string" Value="Chromoting"/>
475 <RegistryValue Name="default_flags" Type="integer" Value="1"/>
476 <RegistryValue Name="default_level" Type="integer" Value="4"/>
477 <RegistryKey Key="Flags" Action="create">
478 <RegistryKey Key="Stack Trace" Action="create">
479 <RegistryValue Type="integer" Value="1"/>
481 <RegistryKey Key="Text Only" Action="create">
482 <RegistryValue Type="integer" Value="2"/>
489 <!-- Delete the usagestats flag to reset the crash dump reporting settings
490 for existing users. -->
491 <Component Id="delete_usagestats"
492 Guid="5c73f2b9-b865-426f-81cc-90a27ebb54aa"
494 <Condition>BROKENUSAGESTATSVERSION</Condition>
497 Key="SOFTWARE\Google\Update\ClientStateMedium\$(var.OmahaAppid)"
504 <DirectoryRef Id="config_files">
505 <!-- Delete debug.log from previous versions -->
506 <Component Id="delete_debug_log"
507 Guid="b309082a-e6fa-4dc7-98e4-3d83c896561d">
508 <RemoveFile Id="debug.log"
514 <!-- The service is always installed in the stopped state with start type
515 set to 'manual'. This becomes a problem when upgrading an existing
516 installation that is configured to start the service automatically.
518 Here we check the startup type before making any changes, then restart
519 the service and change its startup type as needed once the installation
521 <Property Id="CHROMOTING_SERVICE_START_TYPE">
522 <RegistrySearch Id="chromoting_service_start_type"
524 Key="SYSTEM\CurrentControlSet\services\$(var.ServiceName)"
529 <CustomAction Id="query_auto_start_service"
530 Property="auto_start_service"
531 Value="[CHROMOTING_SERVICE_START_TYPE]" />
533 <CustomAction Id="set_auto_start_service"
538 var controller = new ActiveXObject("$(var.ControllerProgid)");
539 controller.StartDaemon();
543 <CustomAction Id="set_service_display_name"
544 Property="chromoting_service_display_name"
545 Value="@[binaries]$(var.CoreBinary),-101" />
546 <CustomAction Id="set_service_description"
547 Property="chromoting_service_description"
548 Value="@[binaries]$(var.CoreBinary),-102" />
550 <!-- XP does not support MUI strings in the service name and description, so
551 we fall back to plain strings on XP. -->
552 <CustomAction Id="set_service_display_name_xp"
553 Property="chromoting_service_display_name"
554 Value="$(var.ChromotingServiceName)" />
555 <CustomAction Id="set_service_description_xp"
556 Property="chromoting_service_description"
557 Value="$(var.ChromotingServiceDescription)" />
559 <UIRef Id="WixUI_ErrorProgressText" />
561 <Feature Id="chromoting_host" Level="1" Title="$(var.ChromotingHost)">
562 <ComponentRef Id="delete_debug_log"/>
563 <ComponentRef Id="delete_usagestats"/>
564 <?if $(var.OfficialBuild) != 0 ?>
565 <ComponentRef Id="omaha_registration"/>
567 <ComponentRef Id="remoting_core"/>
568 <ComponentRef Id="remoting_desktop"/>
569 <ComponentRef Id="remoting_host"/>
570 <ComponentRef Id="remoting_lib"/>
571 <ComponentRef Id="sas"/>
572 <ComponentRef Id="sawbuck_provider"/>
575 <!-- Set the icon shown in Add/Remove Programs. -->
576 <Icon Id="chromoting.ico" SourceFile="chromoting.ico"/>
577 <Property Id="ARPPRODUCTICON" Value="chromoting.ico" />
579 <InstallExecuteSequence>
580 <Custom Action="query_auto_start_service" Before="InstallInitialize"/>
581 <Custom Action="set_auto_start_service" After="StartServices">
582 <![CDATA[NOT REMOVE AND (auto_start_service = "#2")]]>
585 <!-- Set the serivce name and description -->
586 <Custom Action="set_service_display_name_xp" Before="InstallInitialize">
587 <![CDATA[VersionNT < 600]]>
589 <Custom Action="set_service_description_xp" Before="InstallInitialize">
590 <![CDATA[VersionNT < 600]]>
592 <Custom Action="set_service_display_name" Before="InstallInitialize">
593 <![CDATA[VersionNT >= 600]]>
595 <Custom Action="set_service_description" Before="InstallInitialize">
596 <![CDATA[VersionNT >= 600]]>
599 <!-- Schedule RemoveExistingProducts before installing any files.
600 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. -->
601 <RemoveExistingProducts After="InstallInitialize" />
602 </InstallExecuteSequence>