3.2.4.1.5.4 Expanding Environment Variables

Whenever the server machine registry contains a path to a message file, that (REG_EXPAND_SZ) path MAY contain a reference to an environment variable such as "%systemroot%" or "%systemdrive%".

The client MUST attempt to expand the "%systemroot%" and "%systemdrive%" environment variables. The client MUST attempt to replace "%systemroot%" with the registry value on the server computer that is read in the "SystemRoot" value of the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" registry key, and replace "%systemdrive%" with the first two characters of that value.<56>

Expanding environment variables other than "%systemroot%" and "%systemdrive%" are not part of this protocol. The client MAY employ other heuristics or leave these variables unexpanded.