[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Issue on Windows 64 and querying the registry



I agree that programatically  it is possible using KEY_WOW64_32KEY
But I am trying to do it from the .BAT file that sets up paths etc before launching the executable

set REG=%windir%\system32\reg
set FIND=%windir%\system32\find
FOR /F "tokens=2*" %%A IN ('%REG% QUERY "HKLM\Software\My Product" /v "InstallDir" ^| %FIND% "REG_SZ"') DO SET PRODUCTPATH=%%B

The problem is that .BAT file is launched from a 32-bit world ( CONDOR) so 'reg' only sees 32-bit entries.

One solution is to launch a 64-bit executable from CONDOR , and the 64-bit then ShellExecutes the .BAT file, which then should set up all the correct registry entries.

On Sep 7, 2007, at 8:48 AM, Michael McClenahan wrote:

It isnt too hard to work around it and gain access to the real (64bit)

registry from a 32bit process. I use 32bit perl processes to often read

the real 64 bit registry.



Andrew