C# 클래스 NanoByte.Common.RegistryUtils

Provides utility and extension methods for Registry access.
파일 보기 프로젝트 열기: nano-byte/common

공개 메소드들

메소드 설명
DeleteSoftwareValue ( [ subkeyName, [ valueName, bool machineWide ) : void

Deletes a value from one of the SOFTWARE keys in the registry.

Does not throw an exception for missing keys or values.

GetDword ( [ keyName, [ valueName, int defaultValue ) : int

Reads a DWORD value from the registry.

SetDword ( [ keyName, [ valueName, int value ) : void

Sets a DWORD value in the registry.

SetSoftwareString ( [ subkeyName, [ valueName, [ value, bool machineWide = false ) : void

Sets a string value in one or more of the SOFTWARE keys in the registry.

SetString ( [ keyName, [ valueName, [ value ) : void

Sets a string value in the registry.

비공개 메소드들

메소드 설명
CreateSubKeyChecked ( [ key, [ subkeyName ) : RegistryKey
DeleteValue ( RegistryKey root, string subkeyName, string valueName ) : void
GetSoftwareString ( [ subkeyName, [ valueName, [ defaultValue = null ) : string
GetSoftwareString ( [ subkeyName, [ valueName, bool machineWide ) : string
GetString ( [ keyName, [ valueName, [ defaultValue = null ) : string
GetSubKeyNames ( [ key, [ subkeyName ) : string[]
GetValueNames ( [ key, [ subkeyName ) : string[]
OpenHklmKey ( [ subkeyName, bool &x64 ) : RegistryKey
OpenSubKeyChecked ( [ key, [ subkeyName, bool writable = false ) : RegistryKey

메소드 상세

DeleteSoftwareValue() 공개 정적인 메소드

Deletes a value from one of the SOFTWARE keys in the registry.
Does not throw an exception for missing keys or values.
Registry access failed.
public static DeleteSoftwareValue ( [ subkeyName, [ valueName, bool machineWide ) : void
subkeyName [ The path of the key relative to the SOFTWARE key.
valueName [ The name of the value to delete.
machineWide bool true to delete from HKLM/SOFTWARE (and HKLM/SOFTWARE/Wow6432Node if ); false to delete from HCKU/SOFTWARE.
리턴 void

GetDword() 공개 정적인 메소드

Reads a DWORD value from the registry.
Registry access failed.
public static GetDword ( [ keyName, [ valueName, int defaultValue ) : int
keyName [ The full path of the key to read from.
valueName [ The name of the value to read.
defaultValue int The default value to return if the key or value does not exist.
리턴 int

SetDword() 공개 정적인 메소드

Sets a DWORD value in the registry.
Registry access failed. Write access to the key is not permitted.
public static SetDword ( [ keyName, [ valueName, int value ) : void
keyName [ The full path of the key to write to.
valueName [ The name of the value to write.
value int The value to write.
리턴 void

SetSoftwareString() 공개 정적인 메소드

Sets a string value in one or more of the SOFTWARE keys in the registry.
Registry access failed. Write access to the key is not permitted.
public static SetSoftwareString ( [ subkeyName, [ valueName, [ value, bool machineWide = false ) : void
subkeyName [ The path of the key relative to the SOFTWARE key.
valueName [ The name of the value to write.
value [ The value to write.
machineWide bool true to write to HKLM/SOFTWARE (and HKLM/SOFTWARE/Wow6432Node if ); false to write to HCKU/SOFTWARE.
리턴 void

SetString() 공개 정적인 메소드

Sets a string value in the registry.
Registry access failed. Write access to the key is not permitted.
public static SetString ( [ keyName, [ valueName, [ value ) : void
keyName [ The full path of the key to write to.
valueName [ The name of the value to write.
value [ The value to write.
리턴 void