The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_filesys
Class: none
Declaration: function GetProgAssoc (FileExt: string): string;

The function GetProgAssoc returns the program name assciated with the file extension FileExt. The file extension must not contain a leading dot. The returned string contains the full path plus an optional parameter template (if defined).

Following are a few examples of returned strings:

file extension returned string
doc "C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE" /n /dde
exe "%1" %*
itl "C:\iTunes\iTunes.exe" /open "%L"
txt C:\TextPad44\textpad.exe -s
xls "C:\Program Files (x86)\Microsoft Office\Office12\EXCEL.EXE" /e

Hint: Please note that - depending on the specific system setup - the returned path and/or the parameter template may be enclosed by quotes.

Last Update: 2013-Mar-23