I would like to be able to separately query user and system environment variables.
Like they are shown in the Environment Variables dialog.
By using the GetEnvironmentVariable and *getenv* functions I can only get values obtained after merging the two sets of variables, with the user-defined ones taking precedence.
Just like the set command shows on the command line.
This capability would be useful to avoid silently falling back on a system-defined variable when a user-defined one with the same name doesn't exist.
Even an undocumented API would be fine.