2OOO, 3 December
NTSYSAPI NTSTATUS NTAPI
RtlSetEnvironmentVariable(
IN OUT PVOID *Environment OPTIONAL, IN PUNICODE_STRING VariableName, IN PUNICODE_STRING VariableValue );
If Environment is NULL, current environment block is used. If Environment point to NULL value, new environment block is allocated and variable is set in new block. If you can set variable in not currently set env. block, set as Environment pointer to that block.