On Dec 12, 2007 4:51 AM, Kai G. [email protected] wrote:
srv.service_name = “foo”
srv.binary_path_name = "D:\Ruby\bin\ruby "+File.expand_path($0)
srv.display_name = “Test_service”
I will get a 1053 ERROR. How can I rescue the error?
After reading your other thread I see your problem now:
Just make TWO scripts: one for registering the service and the other
for the service itself.
You don’t need to register the service again when it’s just being
Or, you can merge them in one file, but distinguish among them using
command line options.
I mean, if you run my_service --register or my_service --unregister,
then it will to the register/unregister stuff.
Without option, it will run the Daemon stuff.
Note that in order to start the notepad, you might need to allow the
service interact with desktop. (Though
I don’t remember if this is valid for xp or for vista only. Have a
look in the service’s properties.)