| Index: remoting/host/installer/chromoting.wxs
|
| diff --git a/remoting/host/installer/chromoting.wxs b/remoting/host/installer/chromoting.wxs
|
| index d546a44aeb46315395a3766f9adc0badddad6ad2..4fc1c89b90fd89988fd636440388bc532b13d5cd 100644
|
| --- a/remoting/host/installer/chromoting.wxs
|
| +++ b/remoting/host/installer/chromoting.wxs
|
| @@ -108,7 +108,7 @@
|
| DisplayName="@[#remoting_service.exe],-101"
|
| Description="@[#remoting_service.exe],-102"
|
| Arguments="--host-binary="[#remoting_me2me_host.exe]" --auth-config="[config_files]host.json" --host-config="[config_files]host.json""
|
| - Start="auto"
|
| + Start="demand"
|
| Account="LocalSystem"
|
| ErrorControl="ignore"
|
| Interactive="no" />
|
| @@ -287,6 +287,35 @@
|
| </Component>
|
| </DirectoryRef>
|
|
|
| + <!-- The service is always installed in the stopped state with start type
|
| + set to 'manual'. This becomes a problem when upgrading an existing
|
| + installation that is configured to start the service automatically.
|
| +
|
| + Here we check the startup type before making any changes, then restart
|
| + the service and change its startup type as needed once the installation
|
| + is finished. -->
|
| + <Property Id="CHROMOTING_SERVICE_START_TYPE">
|
| + <RegistrySearch Id="chromoting_service_start_type"
|
| + Root="HKLM"
|
| + Key="SYSTEM\CurrentControlSet\services\$(var.ServiceName)"
|
| + Name="Start"
|
| + Type="raw" />
|
| + </Property>
|
| +
|
| + <CustomAction Id="query_auto_start_service"
|
| + Property="auto_start_service"
|
| + Value="[CHROMOTING_SERVICE_START_TYPE]" />
|
| +
|
| + <CustomAction Id="set_auto_start_service"
|
| + Impersonate="no"
|
| + Execute="deferred"
|
| + Script="jscript">
|
| + <![CDATA[
|
| + var controller = new ActiveXObject("$(var.ControllerProgid)");
|
| + controller.StartDaemon();
|
| + ]]>
|
| + </CustomAction>
|
| +
|
| <UIRef Id="WixUI_ErrorProgressText" />
|
|
|
| <Feature Id="chromoting_host" Level="1" Title="$(var.ChromotingHost)">
|
| @@ -296,5 +325,12 @@
|
| <ComponentRef Id="service_controller"/>
|
| </Feature>
|
|
|
| + <InstallExecuteSequence>
|
| + <Custom Action="query_auto_start_service" Before="InstallInitialize"/>
|
| + <Custom Action="set_auto_start_service" After="StartServices">
|
| + <![CDATA[NOT REMOVE AND (auto_start_service = "#2")]]>
|
| + </Custom>
|
| + </InstallExecuteSequence>
|
| +
|
| </Product>
|
| </Wix>
|
|
|