Consultor Eletrônico



Kbase 16767: What is the difference between OS-COMMAND and OS-COMMAND NO-WAIT?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   13/10/2010
Status: Verified

GOAL:

An explanation of the difference between OS-COMMAND and OS-COMMAND NO-WAIT

GOAL:

How to use OS-COMMAND

FACT(s) (Environment):

Progress/OpenEdge Product Family
All Supported Operating Systems

FIX:

Different execution paths are taken based on whether the NO-WAIT option is present or not. The following describes the two different execution paths.

1) OS-COMMAND <command-string>

Using OS-COMMAND <command-string> will create a Console Client on Windows 95 and NT and then run the <command-string>. This form of the command allows you to execute programs (.EXE and .COM), batch files (.BAT and .CMD) and internal commands (that is, DIR, SET, PATH). The downside to this approach is Console Client window shown on the screen. The appearance of this window may not be appropriate when running a Windows program.

2) OS-COMMAND NO-WAIT <command-string>

Using OS-COMMAND NO-WAIT <command-string> creates a detached process. This tells Windows to execute the <command-string> without creating a Console Client. Internal commands such as, DIR, SET, PATH can not be executed directly.
To execute a internal command pass " COMMAND /C "on Windows 3.x or " CMD /C " on Windows 95 / NT as the first part of <command-string>. This approach allows you to execute a Windows program without having the DOS Box or Console Client appear on the screen.