Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program Install
Message
From
12/01/2003 01:08:28
 
 
To
12/01/2003 00:11:27
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00740742
Message ID:
00740745
Views:
17
>Hi All,
>
>Is there a way to find out if the user have an acrobat writer/reader install on their computer before enabling one of the options on the form? TIA

Hi Mathew

Check out the Windows API FindExecutable() function here on the UT or at http://www.news2news.com. It returns the associated app for a given file. Also check the ShellExecute() function.

I found the following here on the UT but cannot remember who wrote it so cannot credit the right person. Sorry.
DECLARE INTEGER FindExecutable IN shell32; 
    STRING   lpFile,; 
    STRING   lpDirectory,; 
    STRING @ lpResult 

DECLARE INTEGER GetLastError IN kernel32 

lcResult = SPACE(250) 

IF FindExecutable ("c:\temp\MyTest.pdf", "", @lcResult) > 32 
    ? Left (lcResult, AT(Chr(0), lcResult)-1) 
ELSE 
    *   2 = Cannot find the file specified 
    *   3 = Cannot find the path specified 
    *  21 = The device is not ready 
    * 127 = The specified procedure could not be found 
    ? "Error code:", GetLastError() 
ENDIF  
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform