cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
afxSam
Level 3

How can I access the 64-bit registry from an x86 installer?

I'm making an installer for an x86 program that needs to be installed on x86 and 64 bit systems. However, I also need to be able to place a single 64-bit plugin file under the 64-bit version of Photoshop that will act as a conduit to our app. So all I need to do is have a System Registry Search return me the location of the 64 bit photoshop rather than the version that exists under the WOW6432Node registry key (so it's returning Software\WOW6432Node\Adobe\Photoshop rather than Software\Adobe\Photoshop). I would then be able to set that path onto the component for this file and have it install in the correct place.

The System Registry Search has a checkbox to "Search 64-bit portion of Registry" but I can't find any info about this in the help manual or online and it isn't setting anything into the property that my Registry Search is using. Does anyone know any way of cheating the system on this? I HAVE to be able to access that 64-bit Photoshop key!

Any advice would be greatly appreciated!
Labels (1)
0 Kudos

(1) Reply
rguggisberg
Level 13

Don't know if you are comfortable with launching a bat file from IS or what you know about Sysnative and the REG command. There are actually 2 CMD.exe's on a 64 bit machine (32 bit and 64 bit). Search and see for yourself. Everything in your install is 32 bit, but you want to execute the 64 bit cmd.exe so that REG changes are made to the 64 bit portion of the registry. Be advised that you can't do a dir on Sysnative, etc. You can google it and read up on it. I have used code something like below (Note: Untested snippet from something I use). If you want to pursue this you could do something like this:

bat file
------------------------------------------------------------------
@ECHO OFF
PROMPT $s
REM PAUSE's need to come out if running "HIDDEN", but I would rather leave them in here in case of error.

REM You may want to do something else here
IF NOT DEFINED PROGRAMFILES(x86) ECHO.This is a 32 bit system & PAUSE & GOTO :AllDone

REM IF 2003 Server or XP there is no such thing as Sysnative
VER | FIND "Version 5." > nul
IF %ERRORLEVEL%==0 GOTO :NoSysNative
REM IF 64-bit Vista or above, set to access the native system directory
SET Cmd=%windir%\Sysnative\cmd.exe /C

REM %CMD is required for 64-bit so that we access desired keys instead of those in Wow6432Node
REM Replace the /? below with the desired REG command
@ECHO ON
%CMD% REG /?
@ECHO OFF
REM Remove pause below later when working
PAUSE
GOTO :AllDone

:NoSysNative
REM 64-Bit XP OR 2003 Server.
ECHO.Unable to make changes to 64-bit registry settings from an
ECHO.install of a 32-bit application for this OS.
ECHO.
PAUSE

:AllDone
PROMPT $p$g
---------------------------------------------------------
Let us know if you need more help.
Good Luck!
0 Kudos