User`s guide
324 VEE User’s Guide
8 Integrating Programs for the PC Chapter
Using a System Command
To call a compiled program in another language, you can type in
the executable file and any parameters in the Execute
Program object.
However, to execute an MS DOS system command, you must
first run the DOS command interpreter. In this exercise, you
will run the DOS command interpreter and execute an MS DOS
system command.
Lab 8-1: Using a System Command
1 Select I/O ⇒ Execute Program. Click the Prog with params field
to get a cursor, then type:
command.com /c dir >> c:\bob
(You may need to include the complete path of the
command.com executable.) The command runs the DOS
command interpreter, which runs the system command to
display the current directory, and redirects the output (>) to
the bob file instead of the computer screen.
Leave Yes for the Wait for prog exit selection. Leave Normal
for Run Style, and enter c:\ for the Working directory.
2 Select I/O ⇒ From ⇒ File and place it below Execute
Program. Connect the sequence out pin of Execute Program
to the sequence in pin of the From File object.
Click the From File: input field labeled myFile to get a list
box, enter c:\bob, then click OK. (The program creates the file
bob for you.)
NOTE
Replace command.com with cmd for Windows NT 4.0, Windows 2000, or
Windows XP. If the drive letter is different from c:, then substitute that
drive letter in these instructions. On NT, you may have to specify a
directory for which you have write permissions.