<< Click to Display Table of Contents >> Navigation: 3. Script Language > Registry-commands > Registry Commands |
MiniRobotLanguage (MRL)
REW. Command
REgistry entry Write
Intention
Creates Registry Keys to unlimited depth, creates Entries of any Datatype and value.
If this command fails, it will return a API-Error number on the stack.
If the command succeeds, the value on the stack is zero.
You can use this command on x64 systems. In this case, you have the 32- and the 64-bit registry. You can choose which to use with the OPT. - command.
' Switch access to x64-registry
OPT.reg64|1
or
' Switch access to x32-registry on x64 systems
OPT.reg64|1
Syntax
REW.P1[|P2][|P3][|P4]
Parameter Explanation
P1 - Registry Key to create
P2 - Name of empty Reg - Entry which is been created.
P3 - Content Value of Reg-Entry which is been created.
P4 - Datatype of value which is been created. This is numeric
see below.
here is the numeric code for the datatype-value:
0 - 'REG_NONE No defined value type.
1 - 'REG_SZ A null-terminated string.
It will be a Unicode or ANSI string, depending on
whether you use the Unicode or ANSI functions.
2 - 'REG_EXPAND_SZ A null-terminated string that
contains unexpanded references to
' environment variables (for example, "%PATH%").
It will be a Unicode or ANSI string depending on
whether you use the Unicode or ANSI functions.
3 - 'REG_BINARY Binary data in any form.
4 - 'REG_DWORD A 32-bit number.
5 - 'REG_DWORD_BIG_ENDIAN A 32-bit number in big-endian format.
In big-endian format,
' the most significant byte of a word is the low-order byte.
6 - 'REG_LINK A Unicode symbolic link.
7 - 'REG_MULTI_SZ An array of null-terminated strings,
terminated by two null characters.
8 - 'REG_RESOURCE_LIST A device-driver resource list.
Example
'**********************************************
' REW. - Sample
'**********************************************
'DBM.2
$$REG=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
$$REG=\$$REGlanmanserver\parameters\
DBP. Result: Exist
$$MYN=AutoShareWks
$$VAL=0
REW.$$REG|$$MYN|$$VAL|4
PRT.===============================================================
' First we write some Keys ...
: §§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AddressBook\NewA\NEWB\
REW.§§REG
DMP.4
PRT.===============================================================
' Now we write some Keys AND a empty value ...
: §§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AddressBook\NewA\NEWB\
REW.§§REG|MYVAL
DMP.4
PRT.===============================================================
' Now we write some Keys AND a REG_SZ value ...
: §§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AddressBook\NewA\NEWB\
: §§MYN=Val_Name
: §§VAL=Content
REW.§§REG|§§MYN|§§VAL
DMP.4
PRT.===============================================================
' Now we write some Keys AND a DWORD value ...
: §§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AddressBook\NewA\NEWB\
: §§MYN=Val_Number
: §§VAL=123456
REW.§§REG|§§MYN|§§VAL|4
DMP.4
END.
Remarks
-
Limitations:
-
See also:
• IER. / NER. - If-Exist-Registry