I want to set an NT environment variable from VB5. I can amend the registry entries at either HKEY_CURRENT_USER\Environment\ (User Variables) or HKEY_CURRENT_USER\Volatile Environment (general variables).
However, an NT command prompt or a COMMAND prompt does not notice the addition or change to these variables.
The only way I've found of getting NT to recognise the new variable or value is to open Control Panel, choose the System option and press OK.
Surely there must be an Api call to reread the registry settings?
I've search MSDN and Microsoft Knowledge Base to no avail.