General discussion
October 18, 2006 at 07:17 PM
dthury

How can I determine an application path from a file extesion?

by dthury . Updated 19 years, 12 months ago

I’m writing a VB script application that needs to print documents created in various applications (such as Adobe Acrobat, MS Word, MS Excel, etc).

The only way I see to do this is to run the application which created the document, specifying the print option. For example, for a Acrobat document, I’d execute something like the following:
“C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe” /p /h docum.pdg

My questions:
1. Is there a better way to print these documents?

2. How can/should I find the proper path for an application associated with a file extension?

I can manually see what I’m looking for in the control panel Folder_Options/FileType. But I need to find this from within my VB Script. I’m sure its somewhere in the registery. Can anyone tell me a reliable registry path for Windows 2000 and/or Windows 2003?

I think I’m willing to “hardcode” the base image (i.e. acrord32.exe or winword.exe), but I think I need to find the full path to the application. I cannot assume that PATH environ variable will have the application path specified.

Thanks,
Denny

This discussion is locked

All Comments