Find the Executable

  • Thread starter Thread starter Paul Ilacqua
  • Start date Start date
P

Paul Ilacqua

I'm looking to located the adobe Executable's location in a vb 2005 program.
IE on my PC it's located @ "C:\Program Files\Adobe\Reader
9.0\Reader\AcroRd32.exe" but on someone else's it may not even be installed
or in another location.
I appreciate the help.

Thanks
Paul
 
Paul said:
I'm looking to located the adobe Executable's location in a vb 2005
program.
IE on my PC it's located @ "C:\Program Files\Adobe\Reader
9.0\Reader\AcroRd32.exe" but on someone else's it may not even be
installed or in another location.
I appreciate the help.

Thanks
Paul

Are you sure you need to find the .exe? I you want to open a pdf file
with it, you can just use the following:

Process p = new Process();
p.StartInfo.FileName = "Some.pdf";
p.StartInfo.Verb = "Open";
p.Start();
 
Family said:
Are you sure you need to find the .exe? I you want to open a pdf file
with it, you can just use the following:

Process p = new Process();
p.StartInfo.FileName = "Some.pdf";
p.StartInfo.Verb = "Open";
p.Start();

If you need the path for AcroRd32.exe, it appears there is a registry
key, HKLM\Software\classes\acrobat\shell\open\command, which has a
default value of:

"C:\Program Files (x86)\Adobe\Reader 9.0\Reader\AcroRd32.exe" /u "%1"

for me.

In general though, the actual path is very application specific. You
cannot depend on one way to find all application paths. Even different
versions may change the way it can be found.
 
Thanks Mike,
My only problem is the occasion where a pdf file is not associated with
Adobe, won't the process call just open the file with it's associated
program? In my testing it does.
Thanks again for the input.

Paul
 
Paul said:
Thanks Mike,
My only problem is the occasion where a pdf file is not associated
with Adobe, won't the process call just open the file with it's
associated program? In my testing it does.
Thanks again for the input.

Paul

Yes, that is correct. Do you have a reason to force Reader to be used
regardless of the user's file associations?
 
Back
Top