To run window service using ruby

Hi…
how to run window service using ruby.
i have exe file for making it to run i have to click it on.
but i want to make it to run using ruby.

Kindly Help me get along with ruby…

Thank you

Newb N. wrote:

Hi…
how to run window service using ruby.
i have exe file for making it to run i have to click it on.
but i want to make it to run using ruby.

Kindly Help me get along with ruby…

If by ‘window service’ you mean the program starts when you turn on your
desktop…

…put the ruby.rb file into your Start menu’s Startup folder. Yes it
will open
a little window. You can use rubyw.exe to fix that.

A true “windows service” is like a daemon. You run in a special place
with
limited facilities, and it’s generally no picnic for a beginner. I have
run many
desktop apps from the Startup menu, including a lite Ruby wiki for my
PIM, and I
never had any issue with it…

Phlip wrote:

Newb N. wrote:

Hi…
how to run window service using ruby.
i have exe file for making it to run i have to click it on.
but i want to make it to run using ruby.

Kindly Help me get along with ruby…

If by ‘window service’ you mean the program starts when you turn on your
desktop…

…put the ruby.rb file into your Start menu’s Startup folder. Yes it
will open
a little window. You can use rubyw.exe to fix that.

A true “windows service” is like a daemon. You run in a special place
with
limited facilities, and it’s generally no picnic for a beginner. I have
run many
desktop apps from the Startup menu, including a lite Ruby wiki for my
PIM, and I
never had any issue with it…

Thanks for the reply…

Actually i run qt program as windows service.

to start and restart i manually give command in the windows command
prompt.

now i would like to know how to run this program using our ruby…

any command or something…

pls help

Vikhyat K. wrote:

Newb N. wrote:

Thanks for the reply…

Actually i run qt program as windows service.

to start and restart i manually give command in the windows command
prompt.

now i would like to know how to run this program using our ruby…

any command or something…

pls help

You can run any command as if run in a command line using the system
method, like this:

system(‘command to run’)

thanks much…
just curious to know about ruby classes.

Is it possible to run using ruby if so how…

Thanks

Newb N. wrote:

Thanks for the reply…

Actually i run qt program as windows service.

to start and restart i manually give command in the windows command
prompt.

now i would like to know how to run this program using our ruby…

any command or something…

pls help

You can run any command as if run in a command line using the system
method, like this:

system(‘command to run’)

Newb N. wrote:

Vikhyat K. wrote:

Newb N. wrote:

Thanks for the reply…

Actually i run qt program as windows service.

to start and restart i manually give command in the windows command
prompt.

now i would like to know how to run this program using our ruby…

any command or something…

pls help

You can run any command as if run in a command line using the system
method, like this:

system(‘command to run’)

Now i did start stop and continue and pass the windows service.
but how to Restart a windows service…
What command is needed.

Pls help me

Now i did start stop and continue and pass the windows service.
but how to Restart a windows service…
What command is needed.

Have a look at win32-service gem

http://raa.ruby-lang.org/project/win32-service/

If you want to create a service that is written in ruby, then code
sample there is horribly outdated and you will need to read source code
and comments to understand how to do it in the new style. But if you
want to start/stop/restart some other service, then it works just like
on that page. Have a look.