G
Gary G. Little
I needed to know the OS, whether 32 or 64 bit, so that I could properly set
the \Program Files path to find whatever version of Acrobat is installed.
The 64 bit OS versions use both \Program Files and \Program Files (x86), and
since Acrobat reader is only 32 bits, it installs into the (x86) path. The
problem is that the VB code shells out to the Adobe Reader via an explicit
path based on a 32 bit OS installation and hence can never find the reader
since it always looks in \Program Files and never \Program Files (x86). The
code was developed on 32 bit systems so using that explicit path was
acceptable at the time. With the advent of newer 64 bit systems that
obviously ain't gonna work for everybody.
Trying to resolve the issue with minimal impact, I added this line to the
module:
if Left(Environ("PROCESSOR_ARCHITECTURE"), 5) = "AMD64".
However ... Environ always returns "x86", the if takes the else clause and I
never find the Acrobat Reader. It does this whether I'm under XP 64 Pro on a
dual XEON system, or under Vista 64 Ultimate on a Core 2 Duo T7500. When I
enter a command line and look at the variable it shows "AMD64". It's almost
like ACCESS and VB reload the environment variable(s) because everywhere
else I look at that var it's always "AMD64" and not "x86".
I also tried the PROCESSOR_IDENTIFIER but on the XEON that is "EM64T", but
on the core 2 Duo it i s "Intel64". The solution may be to simply use
Environ("ProgramFiles(x86)").
Anyone else encountered this type of problem?
Gary
the \Program Files path to find whatever version of Acrobat is installed.
The 64 bit OS versions use both \Program Files and \Program Files (x86), and
since Acrobat reader is only 32 bits, it installs into the (x86) path. The
problem is that the VB code shells out to the Adobe Reader via an explicit
path based on a 32 bit OS installation and hence can never find the reader
since it always looks in \Program Files and never \Program Files (x86). The
code was developed on 32 bit systems so using that explicit path was
acceptable at the time. With the advent of newer 64 bit systems that
obviously ain't gonna work for everybody.
Trying to resolve the issue with minimal impact, I added this line to the
module:
if Left(Environ("PROCESSOR_ARCHITECTURE"), 5) = "AMD64".
However ... Environ always returns "x86", the if takes the else clause and I
never find the Acrobat Reader. It does this whether I'm under XP 64 Pro on a
dual XEON system, or under Vista 64 Ultimate on a Core 2 Duo T7500. When I
enter a command line and look at the variable it shows "AMD64". It's almost
like ACCESS and VB reload the environment variable(s) because everywhere
else I look at that var it's always "AMD64" and not "x86".
I also tried the PROCESSOR_IDENTIFIER but on the XEON that is "EM64T", but
on the core 2 Duo it i s "Intel64". The solution may be to simply use
Environ("ProgramFiles(x86)").
Anyone else encountered this type of problem?
Gary