If the value parameter is not empty and the environment variable named by the variable parameter does not exist, the environment variable is created and assigned the contents of value. Solely for purposes of this operation, value is considered empty if it is null, contains a zero-length string, or contains an initial hexadecimal zero character (0x00).
If variable contains a non-initial hexadecimal zero character, the characters before the zero character are considered the environment variable name and all subsequent characters are ignored.
If value contains a non-initial hexadecimal zero character, the characters before the zero character are assigned to the environment variable and all subsequent characters are ignored.
If value is empty and the environment variable named by variable exists, the environment variable is deleted. If variable does not exist, no error occurs even though the operation cannot be performed.