If I use the following code:

Service.create('TBWin32Agt', nil,
      :service_type       => Service::WIN32_OWN_PROCESS,
      :description        => ' Reporting Agent',
      :start_type         => Service::AUTO_START,
      :error_control      => Service::ERROR_NORMAL,
      :binary_path_name   => 'C:\\TBWin32\\TB Reporting 
Agent\\TBWin32ReportingAgt.exe',
      :load_order_group   => 'Network',
      :dependencies       => ['W32Time','Schedule'],
      :service_start_name => '',
      :password           => '',
      :display_name       => 'TBWin32RptAgt',
   )

I get "unexpected )" error










Luis Lavena wrote:
> On Apr 4, 7:53 pm, Brian Scott <mr.nov... / gmail.com> wrote:
>> Agent\\TBWin32ReportingAgt.exe'
>> c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/lib/win32/serv
>> ice.rb:277:in `initialize': no options provided (ArgumentError)
>>         from s.rb:6:in `new'
>>         from s.rb:6
> 
> You're using 0.5 win32-service syntax. with 0.6 you need to construct
> everything in inside the new block:
> 
> http://rubyforge.org/docman/view.php/85/595/service.html
> 
> HTH,

-- 
Posted via http://www.ruby-forum.com/.