Consultor Eletrônico



Kbase P128170: How to open a file using its associated application from the ABL on Windows?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/06/2008
Status: Unverified

GOAL:

How to open a file using its associated application from the ABL on Windows?

GOAL:

How to start the application associated with a specific file type?

FACT(s) (Environment):

Windows
Progress 9.x
OpenEdge 10.x

FIX:

The Windows shell is aware of the file associations. The Windows shell will open the associated application for any file used as a command when the file is not itself executable. This is what happens in the Explorer when using the action "open".
To use this feature from the Windows shell, simply use the statement OS-COMMAND from the ABL.
For example:
/* this statement will open test.txt with any application currently associated with the .txt extension */
OS-COMMAND NO-WAIT "test.txt".