I recently had the need to retrieve the default value for a registry key in a NAnt script. The documentation for <readregistry> doesn't specifically mention how to do this.
Turns out that it is pretty simple -- just add a trailing backslash to the key parameter for the task:
<readregistry key="SOFTWARE\Acme\" hive="LocalMachine" property="acme">
If you just specify "SOFTWARE\Acme" for the key, you will an NAnt Registry Value Not Found! error when executing the script.
Subscribe to:
Post Comments (Atom)
1 comment:
Thanks! This probably save me a few hours!
Post a Comment