Core Function RegKeyExists

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> RegKeyExists( <key> ) </pre> === Description === Check if a key exists in the registry. === Parameters === ==== key ==== The registry key to check for. ==== type ====...")
 
 
(2 intermediate revisions by one user not shown)
Line 12: Line 12:
  
 
The registry key to check for.
 
The registry key 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:11, 21 June 2015

RegKeyExists( <key> )

Contents

Description

Check if a key exists in the registry.

Parameters

key

The registry key 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(RegKeyExists(@"HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"))
{
	println("It does exist");
}
else
{
	println("It does not exist");
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox