# External application under Windows

**URL:** <https://www.ruby-forum.com/t/external-application-under-windows/62589>\
**Category:** Ruby\
**Created:** [June 6, 2006, 11:00am UTC](https://www.ruby-forum.com/t/external-application-under-windows/62589 "2006-06-06T11:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [June 6, 2006, 11:00am UTC](https://www.ruby-forum.com/t/external-application-under-windows/62589/1 "2006-06-06T11:00:00Z")

</div>

Dear all,

in Windows XP, I would like to open a an external program (Matlab),  
write commands from a text file to it and close it again.  
Now, I don’t know how to do this using win32ole, as adapting  
Hal F.'s example of MS word doesn’t work in a straightforward  
way:

require “win32ole”

print "Enter the filename to print: "  
docfile = gets

my\_matlab = WIN32OLE.new “Matlab.Application”  
my\_matlab.visible = true  
my\_matlab.documents.open docfile  
my\_matlab.options.printBackground = false

as the system doesn’t know what to think of Matlab.Application.

From the Properties, I know that matlab is started via

C:\Programme\MATLAB\_SV701\bin\win32\MATLAB.exe .

How do I tell my system that it’s there ?  
Alternatively, could this be done by createProcess() ? How ?

Thank you very much,

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [June 6, 2006, 3:12pm UTC](https://www.ruby-forum.com/t/external-application-under-windows/62589/2 "2006-06-06T15:12:12Z")

</div>

Maybe this will help:  
[http://wiki.rubygarden.org/Ruby/page/show/MatlabBridge](http://wiki.rubygarden.org/Ruby/page/show/MatlabBridge)
