System.Win.Registry.TRegistry.WriteExpandString

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure WriteExpandString(const Name, Value: string);

C++

void __fastcall WriteExpandString(const System::UnicodeString Name, const System::UnicodeString Value);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Win.Registry.pas
System.Win.Registry.hpp
System.Win.Registry TRegistry

Description

Stores a string containing unexpanded references to environment variables in a specifically named data value associated with the current key.

Call WriteExpandString to store a string that contains unexpanded references to environment variables such as "%PATH%". The string is stored in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteExpandString. If Name does not exist, it is created.

Value is a string value to store in the registry.

If WriteExpandString fails, an exception is raised.

Note: To write strings that do not contain unexpanded environment variables, use WriteString instead.

See Also

Code Examples