External application under Windows

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

Maybe this will help:
http://wiki.rubygarden.org/Ruby/page/show/MatlabBridge