# File lib/chef/provider/service/windows.rb, line 68 def stop_service begin Chef::Log.debug "stopping service using the given stop_command" result = if @new_resource.stop_command IO.popen(@new_resource.stop_command).readlines else IO.popen("#{@init_command} stop #{@new_resource.service_name}").readlines end Chef::Log.debug result.join result[3].include?('1') rescue Chef::Log.debug "Failed to stop service #{@new_resource.service_name}" false end end