I missed the pre-history of this thread and therefore don't know if I'm reposting a tip. Anyway, there is a VFP foundation class that you can use to address this issue with minimum fuss.
From the Component Gallery / Foundation Classes / Utilities insert the "Registry Access" class library into your project and
SET CLASSLIB TO "registry" ADDITIVE
...
loApplication = CREATEOBJECT("registry.filereg")
IF TYPE("loApplication")="O" AND loApplication.GetAppPath("HTM",@lcFileDescription,@lcBrowser,.F.)=0
IF LEFT(lcBrowser,1)='"'
lcBrowser = LEFT(lcBrowser,AT('"',lcBrowser,2))
lcBrowser = SUBSTR(lcBrowser,2,LEN(lcBrowser)-2)
ENDIF
ENDIF
lcBrowser holds the path to the default executable
>I think the sample code from Cetin is my best option so far as it returns the executable file associated with a file extention. So I can pass it "HTM" and it will return the default executable to open htm files.
bye
----------------------------------
António Tavares Lopes