From b5f25cc5c8f89c513f161fc093c56a0deb19bc58 Mon Sep 17 00:00:00 2001 From: "SND\\air_max_cp" Date: Tue, 14 Jun 2011 14:38:57 +0000 Subject: [PATCH] [test] fixed _run_pykdtest.cmd when it's launched from 32-bit cmd.exe in 64-bit OS. git-svn-id: https://pykd.svn.codeplex.com/svn@66776 9b283d60-5439-405e-af05-b73fd8c4d996 --- test/scripts/_run_pykdtest.cmd | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/scripts/_run_pykdtest.cmd b/test/scripts/_run_pykdtest.cmd index 220ed32..c9dbcbe 100644 --- a/test/scripts/_run_pykdtest.cmd +++ b/test/scripts/_run_pykdtest.cmd @@ -1,3 +1,5 @@ +::@echo on + :: Pass $(TargetDir)\ from Visual Studio set TestAppPath=%1 @@ -9,15 +11,14 @@ if "%PROCESSOR_ARCHITECTURE%" == "x86" ( if not defined PROCESSOR_ARCHITEW6432 set Arch=x86 ) -:: Select appropriate python.exe path set PythonRegKey=HKLM\Software\Python\PythonCore\2.6\InstallPath -if "%Arch%" == "x64" ( - if "%TestAppPlatform%" == "Win32" set PythonRegKey=HKLM\Software\Wow6432Node\Python\PythonCore\2.6\InstallPath -) -for /F "tokens=3*" %%A in ('reg.exe query %PythonRegKey% /ve 2^>NUL ^| FIND "REG_SZ"') do set PythonInstallPath=%%B +set RegSwitch=64 +if "%TestAppPlatform%"=="Win32" set RegSwitch=32 + +for /F "tokens=3*" %%A in ('reg.exe query %PythonRegKey% /ve /reg:%RegSwitch% 2^>NUL ^| FIND "REG_SZ"') do set PythonInstallPath=%%B ::echo %PythonInstallPath% %PythonInstallPath%python.exe "%~dp0pykdtest.py" %TestAppPath% -::pause +::pause \ No newline at end of file