[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

to run window service using ruby

Newb Newb

4/8/2009 4:01:00 AM

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
--
Posted via http://www.ruby-....

6 Answers

Phlip

4/8/2009 4:06:00 AM

0

Newb Newb 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...

Newb Newb

4/8/2009 4:42:00 AM

0

Phlip wrote:
> Newb Newb 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
--
Posted via http://www.ruby-....

Vikhyat Korrapati

4/8/2009 4:46:00 AM

0

Newb Newb 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')
--
Posted via http://www.ruby-....

Newb Newb

4/8/2009 5:03:00 AM

0

Vikhyat Korrapati wrote:
> Newb Newb 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
--
Posted via http://www.ruby-....

Newb Newb

4/8/2009 9:11:00 AM

0

Newb Newb wrote:
> Vikhyat Korrapati wrote:
>> Newb Newb 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
--
Posted via http://www.ruby-....

Alexey Borzenkov

4/9/2009 8:39:00 PM

0

>> 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/win3...

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.
--
Posted via http://www.ruby-....