www.icetips.com  Icetips Utilities Documentation 6/29/2009    

Shell Class:  GetAssociatedProg

Previous  Top  Next  


Prototype: (String pFileName),String

 

pFileNameName of the file to get associated program for.

 

ReturnsThe full path and filename of the executable associated with the file.  If no association is found, the method returns an empty string.

 

Use this method to find executable associated with specific file extension, such as .xls for MS Excel etc.  Using any of the run or ShellExecute methods uses the same method to find the associated executable to be able to run files, open web pages etc. etc.  Note that the file MUST exist.  If the file does not exist use GetExeFromExtension.

Example:

 

ITS  ITShellClass

Loc:FileName  String(255)

Code

Loc:FileName = 'c:\test.aprj' !! Build Automator Extension

Message('Program to open ' & Clip(Loc:FileName) & ': ' &|

        ITS.GetExeFromExtension(Loc:FileName),'Associated Executable',ICON:Exclamation)

 

See also:

AssociateProgram
GetAssociatedVerb
GetExeFromExtension
ITRun
ITRunWait
ITShellExec
ShellExec
ShellExecEx

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/getassociatedprog_shellclass.htm