Core Function RegValueExists

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
 
Line 13: Line 13:
 
The registry key to read.
 
The registry key to read.
  
==== key ====
+
==== value ====
  
 
The registry value to check for.
 
The registry value to check for.
 
==== type ====
 
 
Type of key to write:
 
 
<pre>
 
"REG_DWORD"              Int32
 
"REG_QWORD"              Int64
 
"REG_SZ"                String
 
"REG_EXPAND_SZ"          Expandable Stgring
 
"REG_MULTI_SZ"          Array of strings
 
"REG_BINARY"            Binary data
 
</pre>
 
  
 
=== Return Value ===
 
=== Return Value ===

Latest revision as of 12:12, 21 June 2015

RegValueExists( <key>, <value> )

Contents

Description

Check if a key value in the registry.

Parameters

key

The registry key to read.

value

The registry value to check for.

Return Value

Success: Returns true.

Failure: Returns false.

Remarks

A registry key must start with:

"HKEY_LOCAL_MACHINE" or "HKLM"

"HKEY_USERS" or "HKU"

"HKEY_CURRENT_USER" or "HKCU"

"HKEY_CLASSES_ROOT" or "HKCR"

"HKEY_CURRENT_CONFIG" or "HKCC"

Example

if(RegValueExists(@"HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @"AdobeBridge"))
{
	println("It does exist");
}
else
{
	println("It does not exist");
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox