[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] Issue on Windows 64 and querying the registry
- Date: Mon, 10 Sep 2007 11:54:33 +0100
- From: "Matt Hope" <matthew.hope@xxxxxxxxx>
- Subject: Re: [Condor-users] Issue on Windows 64 and querying the registry
On 9/7/07, Andrew Cunningham <andrewc@xxxxxxx> wrote:
> 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
if you are running on windows just relaunch a cmd from
%SystemRoot%/Sysnative/cmd.exe (see MSDN) if not on vista build
yourself a tiny executable that disables the FS redirector then
launches the 64bit cmd.exe passing on the arg list.
> 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.
Condor should stay away from that entirely for now. It works in the
default case and if you need to work round it from a script it's easy.
As for executables rather than scripts that's a different matter...