[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Annoying CMD Windows on Win32

Tim Morgan

4/19/2006 7:24:00 PM

I have a web application on win32 that runs as a service. When system
calls are made (with backticks or IO.popen), cmd windows appear and
disappear very annoyingly. Any ideas on how to stop this?

4 Answers

sanat.gersappa

4/21/2006 7:35:00 AM

0

Try using the Com object WScript.Shell. For a VBScript example see
http://www.ss64.com/ws.... You will need to translate this to
ruby and use the WIN32OLE module.

Dave Burt

4/21/2006 2:42:00 PM

0

Tim Morgan wrote:
> I have a web application on win32 that runs as a service. When system
> calls are made (with backticks or IO.popen), cmd windows appear and
> disappear very annoyingly. Any ideas on how to stop this?

Are you using rubyw.exe?

Cheers,
Dave

Tim Morgan

4/21/2006 7:47:00 PM

0

Actually, I'm using the Mongrel (http://mongrel.rub...)
rails-app-as-a-service script.

A quick read through the relevant Mongrel code turns up these lines of
code:

# ruby.exe instead of rubyw.exe due a exception raised when stoping the
service!
binary_path = ""
binary_path << '"' << Config::CONFIG['bindir'] << '/ruby.exe' << '" '

Are you saying that rubyw.exe would hide these cmd windows from view?

Dave Burt

4/22/2006 4:08:00 AM

0

Tim Morgan wrote:
> Actually, I'm using the Mongrel (http://mongrel.rub...)
> rails-app-as-a-service script.
>
> A quick read through the relevant Mongrel code turns up these lines of
> code:
>
> # ruby.exe instead of rubyw.exe due a exception raised when stoping the
> service!
> binary_path = ""
> binary_path << '"' << Config::CONFIG['bindir'] << '/ruby.exe' << '" '
>
> Are you saying that rubyw.exe would hide these cmd windows from view?

Yes, I'm pretty sure it would. You can use the Services MMC to do stop
the service if you need to, I think.

Cheers,
Dave