OLD | NEW |
---|---|
1 <?xml version="1.0"?> | 1 <?xml version="1.0"?> |
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | 2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
3 | 3 |
4 <?define EventSourceName = "chromoting" ?> | 4 <?define EventSourceName = "chromoting" ?> |
5 <?define ServiceName = "chromoting" ?> | 5 <?define ServiceName = "chromoting" ?> |
6 | 6 |
7 <!-- TODO(alexeypa): There strings should be localized, | 7 <!-- TODO(alexeypa): There strings should be localized, |
8 see http://crbug.com/121785 --> | 8 see http://crbug.com/121785 --> |
9 <?if $(var.Branding) ~= Chrome ?> | 9 <?if $(var.Branding) ~= Chrome ?> |
10 <?define ChromotingHost = "Chrome Remote Desktop Host" ?> | 10 <?define ChromotingHost = "Chrome Remote Desktop Host" ?> |
(...skipping 23 matching lines...) Expand all Loading... | |
34 | 34 |
35 <?define OmahaAppid = "{b210701e-ffc4-49e3-932b-370728c72662}" ?> | 35 <?define OmahaAppid = "{b210701e-ffc4-49e3-932b-370728c72662}" ?> |
36 <?define UpgradeCode = "2b21f767-e157-4fa6-963c-55834c1433a6" ?> | 36 <?define UpgradeCode = "2b21f767-e157-4fa6-963c-55834c1433a6" ?> |
37 | 37 |
38 <?define CoreBinary = "remoting_core.dll" ?> | 38 <?define CoreBinary = "remoting_core.dll" ?> |
39 <?define HostBinary = "remoting_host.exe" ?> | 39 <?define HostBinary = "remoting_host.exe" ?> |
40 | 40 |
41 <?define ChromotingTypelib = "{b6396c45-b0cc-456b-9f49-f12964ee6df4}" ?> | 41 <?define ChromotingTypelib = "{b6396c45-b0cc-456b-9f49-f12964ee6df4}" ?> |
42 | 42 |
43 <!-- AppIDs used by the COM components. --> | 43 <!-- AppIDs used by the COM components. --> |
44 <?define ControllerAppid = "{4ff35d5e-d226-4550-9248-03e7779e67de}" ?> | |
45 <?define RdpAppid = "{52e6fd1a-f16e-49c0-aacb-5436a915448b}" ?> | 44 <?define RdpAppid = "{52e6fd1a-f16e-49c0-aacb-5436a915448b}" ?> |
46 | 45 |
47 <?define ControllerClass = "ElevatedController Class" ?> | |
48 <?define ControllerProgid = | |
49 "ChromotingElevatedController.ElevatedController" ?> | |
50 | |
51 <?define IRdpDesktopSessionId = "{6a7699f0-ee43-43e7-aa30-a6738f9bd470}" ?> | 46 <?define IRdpDesktopSessionId = "{6a7699f0-ee43-43e7-aa30-a6738f9bd470}" ?> |
52 <?define IRdpDesktopSessionEventHandlerId = | 47 <?define IRdpDesktopSessionEventHandlerId = |
53 "{b59b96da-83cb-40ee-9b91-c377400fc3e3}" ?> | 48 "{b59b96da-83cb-40ee-9b91-c377400fc3e3}" ?> |
54 | 49 |
55 <!-- | 50 <!-- |
56 The long hex value(s) below are security descriptors generated from SDDL | 51 The long hex value(s) below are security descriptors generated from SDDL |
57 definition using the PowerShell script below: | 52 definition using the PowerShell script below: |
58 | 53 |
59 $sddl = "<SDDL definition goes here>" | 54 $sddl = "<SDDL definition goes here>" |
60 $i = ([wmiclass]"Win32_SecurityDescriptorHelper").SDDLToBinarySD($sddl).Bina rySD | 55 $i = ([wmiclass]"Win32_SecurityDescriptorHelper").SDDLToBinarySD($sddl).Bina rySD |
61 -join ($i | foreach {$_.ToString("X2")}) | 56 -join ($i | foreach {$_.ToString("X2")}) |
62 --> | 57 --> |
63 | 58 |
64 <!-- | 59 <!-- |
65 A security descriptor that gives SYSTEM, built-in administrators and | 60 A security descriptor that gives SYSTEM, built-in administrators and |
66 LocalService accounts COM_RIGHTS_EXECUTE, COM_RIGHTS_EXECUTE_LOCAL, and | 61 LocalService accounts COM_RIGHTS_EXECUTE, COM_RIGHTS_EXECUTE_LOCAL, and |
67 COM_RIGHTS_ACTIVATE_LOCAL rights. It specifies a mandatory label that | 62 COM_RIGHTS_ACTIVATE_LOCAL rights. It specifies a mandatory label that |
68 specifies "no execute up" policy for medium integrity level. | 63 specifies "no execute up" policy for medium integrity level. |
69 | 64 |
70 $sddl = "O:BAG:BAD:(A;;0xb;;;SY)(A;;0xb;;;BA)(A;;0xb;;;LS)S:(ML;;NX;;;ME)" | 65 $sddl = "O:BAG:BAD:(A;;0xb;;;SY)(A;;0xb;;;BA)(A;;0xb;;;LS)S:(ML;;NX;;;ME)" |
71 --> | 66 --> |
72 <?define RdpSd = "010014807800000088000000140000003000000002001C00010000001100 1400040000000101000000000010002000000200480003000000000014000B000000010100000000 000512000000000018000B00000001020000000000052000000020020000000014000B0000000101 00000000000513000000010200000000000520000000200200000102000000000005200000002002 0000" ?> | 67 <?define RdpSd = "010014807800000088000000140000003000000002001C00010000001100 1400040000000101000000000010002000000200480003000000000014000B000000010100000000 000512000000000018000B00000001020000000000052000000020020000000014000B0000000101 00000000000513000000010200000000000520000000200200000102000000000005200000002002 0000" ?> |
73 | 68 |
74 <!-- Verify that all required parameters are defined. --> | 69 <!-- Verify that all required parameters are defined. --> |
75 <?ifndef ControllerClsid ?> | |
76 <?error ControllerClsid must be defined ?> | |
77 <?endif?> | |
78 | |
79 <?ifndef RdpDesktopSessionClsid ?> | 70 <?ifndef RdpDesktopSessionClsid ?> |
80 <?error RdpDesktopSessionClsid must be defined ?> | 71 <?error RdpDesktopSessionClsid must be defined ?> |
81 <?endif?> | 72 <?endif?> |
82 | 73 |
83 <?ifndef Version ?> | 74 <?ifndef Version ?> |
84 <?error Version must be defined ?> | 75 <?error Version must be defined ?> |
85 <?endif?> | 76 <?endif?> |
86 | 77 |
87 <Product Id="*" | 78 <Product Id="*" |
88 Language="1033" | 79 Language="1033" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 Name="name" | 286 Name="name" |
296 Value="$(var.ChromotingHost)"/> | 287 Value="$(var.ChromotingHost)"/> |
297 </RegistryKey> | 288 </RegistryKey> |
298 </Component> | 289 </Component> |
299 <?endif?> | 290 <?endif?> |
300 | 291 |
301 <Component Id="remoting_lib" Guid="*"> | 292 <Component Id="remoting_lib" Guid="*"> |
302 <RegistryKey Root="HKLM" | 293 <RegistryKey Root="HKLM" |
303 Key="SOFTWARE\Classes"> | 294 Key="SOFTWARE\Classes"> |
304 <RegistryKey Key="AppId"> | 295 <RegistryKey Key="AppId"> |
305 <RegistryKey Key="$(var.ControllerAppid)" Action="create"> | |
306 <RegistryValue Type="string" | |
307 Value="ChromotingElevatedController"/> | |
308 </RegistryKey> | |
309 | |
310 <RegistryKey Key="$(var.RdpAppid)" Action="create"> | 296 <RegistryKey Key="$(var.RdpAppid)" Action="create"> |
311 <RegistryValue Type="string" | 297 <RegistryValue Type="string" |
312 Value="ChromotingRdpDesktopSession"/> | 298 Value="ChromotingRdpDesktopSession"/> |
313 <RegistryValue Name="AccessPermission" | 299 <RegistryValue Name="AccessPermission" |
314 Type="binary" | 300 Type="binary" |
315 Value="$(var.RdpSd)"/> | 301 Value="$(var.RdpSd)"/> |
316 <RegistryValue Name="LaunchPermission" | 302 <RegistryValue Name="LaunchPermission" |
317 Type="binary" | 303 Type="binary" |
318 Value="$(var.RdpSd)"/> | 304 Value="$(var.RdpSd)"/> |
319 <RegistryValue Name="RunAs" | 305 <RegistryValue Name="RunAs" |
320 Type="string" | 306 Type="string" |
321 Value="NT AUTHORITY\LocalService"/> | 307 Value="NT AUTHORITY\LocalService"/> |
322 </RegistryKey> | 308 </RegistryKey> |
323 | 309 |
324 </RegistryKey> | 310 </RegistryKey> |
325 | 311 |
326 <RegistryKey Key="$(var.ControllerProgid)" Action="create"> | |
327 <RegistryValue Type="string" | |
328 Value="$(var.ControllerClass)"/> | |
329 | |
330 <RegistryKey Key="CLSID" Action="create"> | |
331 <RegistryValue Type="string" | |
332 Value="$(var.ControllerClsid)"/> | |
333 </RegistryKey> | |
334 | |
335 <RegistryKey Key="CurVer" Action="create"> | |
336 <RegistryValue Type="string" | |
337 Value="$(var.ControllerProgid).$(var.Version)"/> | |
338 </RegistryKey> | |
339 </RegistryKey> | |
340 | |
341 <RegistryKey Key="$(var.ControllerProgid).$(var.Version)" | |
342 Action="create"> | |
343 <RegistryValue Type="string" | |
344 Value="$(var.ControllerClass)"/> | |
345 | |
346 <RegistryKey Key="CLSID" Action="create"> | |
347 <RegistryValue Type="string" | |
348 Value="$(var.ControllerClsid)"/> | |
349 </RegistryKey> | |
350 </RegistryKey> | |
351 | |
352 <RegistryKey Key="CLSID"> | 312 <RegistryKey Key="CLSID"> |
353 <RegistryKey Key="$(var.ControllerClsid)" Action="create"> | |
354 <RegistryValue Type="string" | |
355 Value="$(var.ControllerClass)"/> | |
356 | |
357 <RegistryValue Type="string" | |
358 Name="AppID" | |
359 Value="$(var.ControllerAppid)"/> | |
360 | |
361 <RegistryValue Type="string" | |
362 Name="LocalizedString" | |
363 Value="@[binaries]$(var.CoreBinary),-103"/> | |
364 | |
365 <RegistryKey Key="LocalServer32" Action="create"> | |
366 <RegistryValue Type="string" | |
367 Value="[binaries]$(var.HostBinary) --type=control ler"/> | |
368 </RegistryKey> | |
369 | |
370 <RegistryKey Key="ProgID" Action="create"> | |
371 <RegistryValue Type="string" | |
372 Value="$(var.ControllerProgid).$(var.Version)"/> | |
373 </RegistryKey> | |
374 | |
375 <RegistryKey Key="TypeLib" Action="create"> | |
376 <RegistryValue Type="string" | |
377 Value="$(var.ChromotingTypelib)"/> | |
378 </RegistryKey> | |
379 | |
380 <RegistryKey Key="VersionIndependentProgID" Action="create"> | |
381 <RegistryValue Type="string" | |
382 Value="$(var.ControllerProgid)"/> | |
383 </RegistryKey> | |
384 | |
385 <RegistryKey Key="Elevation" Action="create"> | |
386 <RegistryValue Type="integer" | |
387 Name="Enabled" | |
388 Value="1"/> | |
389 <RegistryValue Type="string" | |
390 Name="IconReference" | |
391 Value="@[binaries]$(var.CoreBinary),-104"/> | |
392 </RegistryKey> | |
393 </RegistryKey> | |
394 <RegistryKey Key="$(var.RdpDesktopSessionClsid)" Action="create"> | 313 <RegistryKey Key="$(var.RdpDesktopSessionClsid)" Action="create"> |
395 <RegistryValue Type="string" | 314 <RegistryValue Type="string" |
396 Value="RdpDesktopSession Class"/> | 315 Value="RdpDesktopSession Class"/> |
397 | 316 |
398 <RegistryValue Type="string" | 317 <RegistryValue Type="string" |
399 Name="AppID" | 318 Name="AppID" |
400 Value="$(var.RdpAppid)"/> | 319 Value="$(var.RdpAppid)"/> |
401 | 320 |
402 <RegistryKey Key="LocalServer32" Action="create"> | 321 <RegistryKey Key="LocalServer32" Action="create"> |
403 <RegistryValue Type="string" | 322 <RegistryValue Type="string" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
638 | 557 |
639 <CustomAction Id="query_auto_start_service" | 558 <CustomAction Id="query_auto_start_service" |
640 Property="auto_start_service" | 559 Property="auto_start_service" |
641 Value="[CHROMOTING_SERVICE_START_TYPE]" /> | 560 Value="[CHROMOTING_SERVICE_START_TYPE]" /> |
642 | 561 |
643 <CustomAction Id="set_auto_start_service" | 562 <CustomAction Id="set_auto_start_service" |
644 Impersonate="no" | 563 Impersonate="no" |
645 Execute="deferred" | 564 Execute="deferred" |
646 Script="jscript"> | 565 Script="jscript"> |
647 <![CDATA[ | 566 <![CDATA[ |
648 var controller = new ActiveXObject("$(var.ControllerProgid)"); | 567 var ADS_SERVICE_STOPPED = 0x00000001; |
649 controller.StartDaemon(); | 568 var service = GetObject("WinNT://./$(var.ServiceName),Service"); |
569 if (service.Status == ADS_SERVICE_STOPPED) { | |
570 service.Start(); | |
571 } | |
weitao
2015/02/07 01:27:42
ElevatedController.StartDaemon() did two things: c
Sergey Ulanov
2015/02/09 22:24:16
Is the service kept in auto-start mode when the pa
weitao
2015/02/10 01:05:18
The comment is correct. The auto-start mode should
| |
650 ]]> | 572 ]]> |
651 </CustomAction> | 573 </CustomAction> |
652 | 574 |
653 <CustomAction Id="set_service_display_name" | 575 <CustomAction Id="set_service_display_name" |
654 Property="chromoting_service_display_name" | 576 Property="chromoting_service_display_name" |
655 Value="@[binaries]$(var.CoreBinary),-101" /> | 577 Value="@[binaries]$(var.CoreBinary),-101" /> |
656 <CustomAction Id="set_service_description" | 578 <CustomAction Id="set_service_description" |
657 Property="chromoting_service_description" | 579 Property="chromoting_service_description" |
658 Value="@[binaries]$(var.CoreBinary),-102" /> | 580 Value="@[binaries]$(var.CoreBinary),-102" /> |
659 | 581 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
713 <Custom Action="set_service_description" Before="InstallInitialize"> | 635 <Custom Action="set_service_description" Before="InstallInitialize"> |
714 <![CDATA[VersionNT >= 600]]> | 636 <![CDATA[VersionNT >= 600]]> |
715 </Custom> | 637 </Custom> |
716 | 638 |
717 <!-- Schedule RemoveExistingProducts before installing any files. | 639 <!-- Schedule RemoveExistingProducts before installing any files. |
718 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. --> | 640 See http://msdn.microsoft.com/en-us/library/aa371197.aspx. --> |
719 <RemoveExistingProducts After="InstallInitialize" /> | 641 <RemoveExistingProducts After="InstallInitialize" /> |
720 </InstallExecuteSequence> | 642 </InstallExecuteSequence> |
721 </Product> | 643 </Product> |
722 </Wix> | 644 </Wix> |
OLD | NEW |