pykd
1::@echo on
2
3:: Pass $(TargetDir)\<TestApp.exe> from Visual Studio
4set TestAppPath=%1
5
6:: Pass $(PlatformName) from Visual Studio
7set TestAppPlatform=%2
8
9set Arch=x64
10if "%PROCESSOR_ARCHITECTURE%" == "x86" (
11if not defined PROCESSOR_ARCHITEW6432 set Arch=x86
12)
13
14set PythonRegKey=HKLM\Software\Python\PythonCore\2.7\InstallPath
15
16set RegSwitch=64
17if "%TestAppPlatform%"=="Win32" set RegSwitch=32
18
19for /F "tokens=3*" %%A in ('reg.exe query %PythonRegKey% /ve /reg:%RegSwitch% 2^>NUL ^| FIND "REG_SZ"') do set PythonInstallPath=%%A
20
21%PythonInstallPath%python.exe "%~dp0pykdtest.py" %TestAppPath%
22
23::pause