Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registry File Search
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00196580
Message ID:
00196850
Views:
29
>>>>I was wondering if it is best to check the windows registry to find if an application is installed on a work station? And if so, what command or control would I use to find a file name 'AcroRd32.exe' in the registry using code only. I've looked at serveral controls in the files section, but could not find one to do what I want it to do. I would appreciate any help.
>>>
>>>THe best way to do this, IMHO, is to find out where the program registers itself in the registry and look there specifically. If the program associates any files with itself, you can check the file's association by looking it up in HKEY_CLASSES_ROOT.
>>>
>>>For example, to chack if Acrobat Reader is installed on a machine, you could check if the file type pdf is registered and holds the correct content type.
>>
>>Hi Erik,
>>
>>That's one way to do it. Another, and a bit simpler to implement I believe, would be to use FindExecutable() in Shell32. From the results I've seen, it does all the registry access for you without your having to worry about keys, etc.
>
>Does FindExecutable take a file name? That does sound like the way to go...

That didn't take long, did it?:-)

Well, the file name has to exist. I referenced a non-existant file and got back 2 (which I think means ERROR_FILE_NOT_FOUND). However, when I created the file (with zero bytes, BTW), and called the function, it worked fine even though it wasn't a valid file for the application.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform