MrBogus
MrBogus

Reputation: 26

How to hide the cmd windows when running external executables that are called through an OCRA Ruby executable?

I have a ruby script that runs many external executables (.exe). I run these executables in two different ways.

  1. sytem(program)
  2. IO.popen(program), in this case I need the PID since later on I monitor this process.

My UI is designed with FX ruby. When I run the program through my cmd console (ruby MyScript.rb) everything works fine and I don't see any pop-up.

Then, I generate an exe with the OCRA gem by using the following syntax: ocra MyScript.rb --gem-all --windows

The exe is generated correctly; however, when I run any external program, through system or popen, there is a cmd window popping up during the time the exe is running.

Is there a way to hide these cmd windows?

Upvotes: 0

Views: 63

Answers (0)

Related Questions