I'm sure that there's something silly that I'm missing here..
I'm trying to query the registry (Windows 7 64bit) to get my Python install path. For some reason, I'm getting:
Registry Path Not Found! - key=3D'SOFTWARE\Python\PythonCore\2.7\InstallPath\';hive=3D'LocalMachine'
However, if I replace my key with the sample in the documentation, all works fine. I've rebooted since installing Python (not sure whether or not that makes a difference). What am I missing here?
The task I'm using is:
<readregistry verbose="true" key="SOFTWARE\Python\PythonCore\2.7\InstallPath\" property="installDir" />
reg query HKLM\SOFTWARE\Python\PythonCore\2.7\InstallPath\ /ve
yields the correct path - Demian Brecht 2012-04-04 19:03
LocalMachine
and not as HKLM
, LOCAL_MACHINE
or HKEY_LOCAL_MACHINE
- kirilloid 2012-04-04 19:09
The 'readregistry' task 'key' attribute is misleading.
It does not represent the registry key but instead the key and value name.
So to get the value of 'installDir' from the 'HLKM\SOFTWARE\Python\PythonCore\2.7\InstallPath' key,
and then set it in a property named 'somePropName', what you have to do is :
<readregistry property="somePropName" key="SOFTWARE\Python\PythonCore\2.7\InstallPath\installDir" hive="LocalMachine" />
cmd
withreg query HLKM\SOFTWARE\Python\PythonCore\2.7\InstallPath\ /v installDir
. E.g. I don't have such key. I have XP 32 bit, though - kirilloid 2012-04-04 18:30