RegGetString

 

Read the string value from the registry.

 

string @RegGetString(int mainkey, string subkey, string name, string default_value);

 

Parameters

int mainkey : Registry Main Key (0=ROOT, 1=CURRENT_USER, 2=LOCAL_MACHINE, 3=USERS)

string subkey : Registry key name

string name : Item Name

string default_value : The default value when the registry value does not exist

 

Return Value

Returns the read registry value (string)

 

Example

buf = @RegGetString(1, "Software\\AOB_Master\\Config", "ComPort", "Hello");
@ObjectSetText("Text1", buf);
$AI_0000 = @RegGetInt(1, "Software\\AOB_Master\\Config", "DeviceType", 99);

 

Description : Read the string value of the ComPort entry from the SoftwareAOB_MasterConfig key in CURRENT_USER. If the value doesn't exist, it returns "Hello".

 

Version Information

Supported Version: 10.2.9 or higher

 

Related Helps

@RegGetInt()

@RegGetString()

@RegSetInt()

@RegSetString()