Skip to content

WriteInteger - cRegistry

Writes an Integer Value into the currently open Key of the Windows Registry

Type: Procedure

Parameters

Parameter Type Description
sValue WString The name of the Value to write to. If this parameter is an empty string, then the contents of sValueData will be written to the "default" Value
iValueData Integer The data to write

Syntax

Procedure WriteInteger WString sValue Integer iValueData

Call Example

Send WriteInteger sValue iValueData

Description

Use WriteInteger to write an Integer value into the currently open Key. If the value does not exist, it will be created.

Use cRegistry.pkg

Object oRegistry is a cRegistry

    Procedure DoWriteData
        Integer iError

        // Open the Key...
        Get CreateKey "Software\MyCompany\MyProduct" to iError
        If (iError =0) Begin
            Send WriteInteger "User Count" 5
            Send CloseKey // must close all open Keys
        End
    End_Procedure

End_Object

Send DoWriteData of oRegistry