Registry Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Registry-commands >

Registry Commands

IER. / NER. - If-Exist-Registry

Previous Top Next


MiniRobotLanguage (MRL)

 

IER. Conditional Statement

If Exist Registry

 

 

Intention

 

This command can be used to find out, if a specified registry Key, Entry or Value is available. Standard-Search Pattern can not be used.

 

You can use this statement 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.reg32|1

 

 

 

Syntax

 

 

IER.P1[|P2][|P3][|P4]

 

 

Parameter Explanation

 

P1 - Registry-path as if you copy it from a ".reg"-file.

P2 - Entry-name if given

P3 - Value if given.

P4 - Type of Entry - if given.

 

Type of Entry is a numeric argument as follows:

'  0 - REG_NONE   ' No value type

'  1 - REG_SZ  ' Unicode nul terminated string

'  2 - REG_EXPAND_SZ ' Unicode nul terminated string plus Environment-Var

'  3 - REG_BINARY   ' Free form binary

'  4 - REG_DWORD  ' 32-bit number

'  4 - REG_DWORD_LITTLE_ENDIAN' 32-bit number (same as %REG_DWORD)

'  5 - REG_DWORD_BIG_ENDIAN ' 32-bit number

'  6 - REG_LINK              ' Symbolic Link (unicode)

'  7 - REG_MULTI_SZ         ' Multiple Unicode strings

'  8 - REG_RESOURCE_LIST ' Resource list in the resource map

'  9 - REG_FULL_RESOURCE_DESCRIPTOR  

' 10 - REG_RESOURCE_REQUIREMENTS_LIST

' 11 - REG_QWORD      ' 64-bit number

' 11 - REG_QWORD_LITTLE_ENDIAN  ' (same as %REG_QWORD)

 

 

 

 

Example

 

''*********************************************

' IER. - Sample

'**********************************************

'DBM.2

PRT.=====================================================

:§§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\SO\MISC

IER.§§REG

PRT. Result: Exist

ELS.

PRT. Result: Doesn't Exist or no Access-Rights.

EIF.

DMP.4

PRT.=====================================================

: §§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\SO\MISC

: §§KEY=Type

IER.§§REG|§§KEY

PRT. Result: Exist

ELS.

PRT. Result: Doesn't Exist or no Access-Rights.

EIF.

DMP.4

PRT.=====================================================

: §§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\SO\MISC

: §§KEY=Type

: §§VAL=group

IER.§§REG|§§KEY|§§VAL

PRT. Result: Exists and is a match

ELS.

PRT. Result: Doesn't Exist or no Access-Rights or Value does not match.

EIF.

DMP.4

PRT.=====================================================

' This is a special case because we give 4 parameter and value is "-"

' in this case value is not evaluated, just the type is compared

' if value is diffrent from "-" it will also be compared.

: §§REG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\SO\MISC

: §§KEY=Type

: §§VAL=-

: §§TYP=2

IER.§§REG|§§KEY|§§VAL|§§TYP

PRT. Result: Exists and is a match

ELS.

PRT. Result: Doesn't Exist or no Access-Rights or Type does not match.

EIF.

DMP.4

PRT.=====================================================

END.

 

 

 

Remarks

 

IEP. and other IXX. can be nested to unlimited Depth, and they can also enclose Sub-Program Calls or FEX. (Enumerations) to unlimited Depth.

 

 

 

Limitations:

 

-

 

 

See also:

 

    1.6.1. Program Flow Control

    OPT. - Optional Settings

    IER. / NER. - If-Exist-Registry

    FER. - For-Each-Registry

    RER. - Registry Entry Read

    REW. - Registry-Entry-Write

    RDI. - Registry-Delete-Item

    RDT. - Registry-DelTree