Article ID: 104011
Article Last Modified on 1/18/2007
HKEY_CURRENT_USER \
Environment
You can modify system environment variables by editing the following
Registry key:
HKEY_LOCAL_MACHINE \
SYSTEM \
CurrentControlSet \
Control \
Session Manager \
Environment
Note that any environment variable that needs to be expanded (for example,
when you use %SYSTEM%) must be stored in the registry as a REG_EXPAND_SZ
registry value. Any values of type REG_SZ will not be expanded when read
from the registry.
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0,
(LPARAM) "Environment", SMTO_ABORTIFHUNG,
5000, &dwReturnValue);
None of the applications that ship with Windows 95 and Windows 98, including Windows Explorer and Program
Manager, respond to this message. Thus, while this article
can technically be implemented on Windows 95 and Windows 98, there is no effect except to
notify third-party applications. The only method of changing global
environment variables on Windows 95 is to modify the autoexec.bat file and
reboot.
Keywords: kbhowto kbsyssettings KB104011