I'd like to be able to expand the value of a REG_EXPAND_SZ retrieved with reg query <KEY> /v <VALUE>.
How do you expand an environment variable containing environment variables (surrounded with %)?
For example, I want to expand %systemroot%\system32\config contained in x to C:\Windows\system32\config.