Use this method to get the
Section object for the system registry key. This will allow you to manage subkeys and values (we will call them sections and options) through this object.
Storages.Registry(Key, RootKey, RegistryType, ReadOnly)
|RootKey||[in]||Optional||Long||Default value: HKEY_CURRENT_USER|
|RegistryType||[in]||Optional||Integer||Default value: 0|
|ReadOnly||[in]||Optional||Boolean||Default value: False|
The method is applied to the following object:
The method has the following parameters:
Specifies the full path to the desired key from the root key. If the key does not exist, the method will create it.
Specifies the root key the desired key belongs to:
RootKey equals to the value of the HKEY_CURRENT_USER constant by default.
This parameter is significant if you use TestComplete on a 64-bit operating system. It specifies which registry view, 32-bit or 64-bit, the method will access. You can use one of the following constants:
|AQRT_32_BIT||0||32-bit registry (default)|
If this parameter's value is True, the Registry key will be opened in read-only mode. Otherwise, it is opened in read-write mode.
Section object that provides scripting access to the specified registry key.
Section object lets you obtain and change registry values of the REG_DWORD, REG_SZ and REG_EXPAND_SZ type only. The REG_BINARY and REG_MULTI_SZ value types are not supported.
|Be careful when working with the system registry using methods of the
To view a sample script demonstrating how to use the
Registry method to access the Windows system registry, see Reading Sections and Options from the System Registry. Example.