How to get Adobe Reader full path(including executable file name)?
Asked Answered
D

4

11

it's possible? I need to get the full path of Adobe Reader including the executable name. I'm looking for on windows registries, the closer that I did was found the full path without executable name. Thanks in advance.

my code:

var adobe = Registry.LocalMachine.OpenSubKey("Software").OpenSubKey("Adobe").OpenSubKey("Acrobat Reader");
var version = adobe.GetSubKeyNames().First();
var path = adobe.OpenSubKey(version).OpenSubKey("installer").GetValue("path");

Thanks in advance.

Decision answered 5/6, 2012 at 5:14 Comment(0)
C
24

One of these should do it for you:

    var adobe = Registry.LocalMachine
                        .OpenSubKey("Software")
                        .OpenSubKey("Microsoft")
                        .OpenSubKey("Windows")
                        .OpenSubKey("CurrentVersion")
                        .OpenSubKey("App Paths")
                        .OpenSubKey("AcroRd32.exe");

    var path = adobe.GetValue("");

    var adobeOtherWay = Registry.LocalMachine
                                .OpenSubKey("Software")
                                .OpenSubKey("Classes")
                                .OpenSubKey("acrobat")
                                .OpenSubKey("shell")
                                .OpenSubKey("open")
                                .OpenSubKey("command");

    var pathOtherWay = adobeOtherWay.GetValue("");

Pick one and run with it ;)

Cytosine answered 5/6, 2012 at 5:45 Comment(9)
No problem, just mark my answer as correct and I can go to sleep! :)Cytosine
Wait... Is the "AcroRd32.exe" default name of Adobe Reader independent version,architecture etc?Decision
I'm running Windows 7 64 bit right now and it matches my old XP x86 machine. So I assume it's OK. If you have ANY trouble give me a shout and I'll write something a bit more complex to fix it. But I really don't think you'll have any issues!Cytosine
Plus, don't forget you have my second solution which doesn't require the "AcroRd32.exe" usage anyway!Cytosine
and I'm on a 32bit machine,have same name. Well.. seems default. Anything, I will back here. :) Have a good night, man. :)Decision
That was a slow response! But cool, it's the better way IMHO.Cytosine
I said this because I have no sure if AcroRd32.exe is compatible with older versions, unlike 'anotherway`. If I'm wrong, tell me please.Decision
I don't know for SURE that the AcroRd32.exe way is compatible. You made the right choice, the adobeOtherWay method was the right choice.. It's the safest option!Cytosine
On Windows Server 2003, the registry path is Software\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exePearson
S
5

I found a problem with the "adobeOtherWay" solution. If Adobe Acrobat(not reader) is installed, then the path will point to Acrobat.exe and not the reader's exe.(I wanted to comment to above, but don't have enough reputation)

Spatola answered 26/10, 2012 at 9:50 Comment(0)
G
4

I'm using : HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe It gives me the full path and exe- name of the installed Acrobat Reader, just what you need.

Greggrega answered 9/2, 2016 at 1:23 Comment(1)
This works if Acrobat Reader is the default PDF viewer. If Adobe Acrobat (ie: the paid version) is the default, it appears in this key instead.Nullify
M
0

I used the Everything software (https://www.voidtools.com/) to find this executable on 64-bit Windows 10 machine, by searching for Acro *.exe in Everything. It showed several exe files and I double clicked each one for testing. The exe file called Acrobat.exe was what I needed. You can get the full path of this exe file in Everything.

Muliebrity answered 31/8 at 14:32 Comment(2)
I used my favorite search tool: get adobe read full path, to find How to get Adobe Reader full path. How does your answer improve the (accepted!) answer from more than 10 years ago ?Roccoroch
My answer is easy to use, as it does not require coding skill or knowledge of register editors.Muliebrity

© 2022 - 2024 — McMap. All rights reserved.