Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: remoting/host/installer/chromoting.wxs

Issue 10048003: The Chromoting service should not start automatically unless it was configured from the webapp to d… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/host_service_win.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « remoting/host/host_service_win.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698