Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Find the Executable

0 views
Skip to first unread message

Paul Ilacqua

unread,
Dec 6, 2009, 8:45:23 AM12/6/09
to
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

Family Tree Mike

unread,
Dec 6, 2009, 11:58:01 AM12/6/09
to

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();

--
Mike

Family Tree Mike

unread,
Dec 6, 2009, 2:22:01 PM12/6/09
to

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.

--
Mike

Paul Ilacqua

unread,
Dec 6, 2009, 2:57:03 PM12/6/09
to
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

"Family Tree Mike" <FamilyT...@ThisOldHouse.com> wrote in message
news:%231qThlq...@TK2MSFTNGP02.phx.gbl...


> Family Tree Mike wrote:
>> Paul Ilacqua wrote:

>>> I'm looking to located the adobe Executable's location in a vb 20 the
>>> file with it's associated program?
05

Family Tree Mike

unread,
Dec 6, 2009, 4:34:38 PM12/6/09
to

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

--
Mike

0 new messages