NAnt SDK Documentation - v0.92 |

# ReadRegistryTask Class

Reads a value or set of values from the Windows Registry into one or more NAnt properties.

For a list of all members of this type, see ReadRegistryTask Members.

System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Win32.Tasks.ReadRegistryTask

[Visual Basic]
<TaskName(Name:="readregistry")>
Public Class ReadRegistryTask
Inherits Task
[C#]
[TaskName(Name="readregistry")]
public class ReadRegistryTask : Task

#### Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

#### Example

Read a single value from the registry.

    <readregistry property="sdkRoot" key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot" hive="LocalMachine" />

Read all the registry values in a key.

    <readregistry prefix="dotNetFX" key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot" hive="LocalMachine" />

#### Requirements

Namespace: NAnt.Win32.Tasks

Assembly: NAnt.Win32Tasks (in NAnt.Win32Tasks.dll)

#### See Also

ReadRegistryTask Members | NAnt.Win32.Tasks Namespace