Help Center

AfxRegWritefunction

Creates a new key, adds another value-name to an existing key (and assigns it a value), or changes the value of an existing value-name.

Windowsfunctiondocumented

Syntax

FUNCTION AfxRegWrite (BYREF wszKey AS WSTRING, BYREF dvValue AS DVARIANT, BYREF wszType AS WSTRING) AS HRESULT

Parameters

NameDescription
wszKeyString value indicating the key-name, value-name, or value you want to create, add, or change.
dvValueThe name of the new key you want to create, the name of the value you want to add to an existing key, or the new value you want to assign to an existing value-name.
wszTypeString value indicating the value's data type.

Description

Creates a new key, adds another value-name to an existing key (and assigns it a value), or changes the value of an existing value-name.

Example

AfxRegWrite("HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY") AfxRegWrite("HKCU\Software\ACME\FortuneTeller\MindReader"", "Goocher!", "REG_SZ")

Reference

  • Defined in AfxNova/AfxWsh.inc:74
  • Documented in Windows/Windows Script/Windows Shell.md
  • Topic: Windows Shell