summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-01-15 17:38:45 -0800
committerMatt Wrock <matt@mattwrock.com>2016-01-15 17:38:45 -0800
commitf96e3828e60694bf398e166cd66b21fa8265997a (patch)
treec5275af01efbf320b6177bdf0ae25f86b82f0b03
parent8ba8dbb6e2d5ba51802e1c9fc98b2eed732d5e6b (diff)
downloadchef-bat.tar.gz
explicitly adding .bat to service executable called by service in case users remove .bat from PATHEXTbat
-rw-r--r--lib/chef/application/windows_service.rb2
-rw-r--r--omnibus/resources/chef/msi/source.wxs.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb
index 957123b1e9..a57cf138e4 100644
--- a/lib/chef/application/windows_service.rb
+++ b/lib/chef/application/windows_service.rb
@@ -196,7 +196,7 @@ class Chef
# Starts a new process and waits till the process exits
result = shell_out(
- "chef-client #{config_params}",
+ "chef-client.bat #{config_params}",
:timeout => Chef::Config[:windows_service][:watchdog_timeout],
:logger => Chef::Log,
)
diff --git a/omnibus/resources/chef/msi/source.wxs.erb b/omnibus/resources/chef/msi/source.wxs.erb
index f9c2b55cde..79f90ac18b 100644
--- a/omnibus/resources/chef/msi/source.wxs.erb
+++ b/omnibus/resources/chef/msi/source.wxs.erb
@@ -96,7 +96,7 @@
<File Id="RubyExecutable" Source="$(var.ProjectSourceDir)\embedded\bin\ruby.exe" KeyPath="yes" />
<ServiceInstall Name="chef-client" Type="ownProcess"
Start="auto" Vital="yes" ErrorControl="ignore"
- Arguments="[PROJECTLOCATION]\bin\chef-windows-service"
+ Arguments="[PROJECTLOCATION]bin\chef-windows-service"
DisplayName="!(loc.ServiceDisplayName)"
Description="!(loc.ServiceDescription)">
<ServiceDependency Id="Winmgmt" />