Discussion Locked

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

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.