General discussion

Locked

Relsolving %systemroot% variable in PATH

By A Fuchigami ·
I'm having a problem with Windows NT resolving the %systemroot% system variable in the PATH. I'm trying to access a file in the WINNT\System32 directory. It is correctly added in the NT Path environment. When I look in the Environment Tab under Control Panel -> System, the GUI correctly maps %systemroot%\system32 to 'C:\WINNT\System32'.

However, in the Command Prompt, if I do a 'path' command, the path variable shows the system variable (i.e. %systemroot%\system32. It doesn't correctlymap the system variable %systemroot% to 'C:\WINNT\'

Does anyone have any idea on how to fix this? I don't really want to hardcode the path 'C:\WINNT\System32' to the system PATH variable, and I've checked if there is anything in User Environements or Autoexec.nt that would add/reset the system variables.

Thanks.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Relsolving %systemroot% variable in PATH

by louise.davie In reply to Relsolving %systemroot% v ...

Hi,

If I understand your problem correctly what you need to do is set the registry entry for the PATH variable to expand to do this do the following:

1) RUN REGEDT32.exe (NOT REGEDIT)
2) Navigate to the following area:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
3) Locate PATH and confirm its current status.
4) With you problem, this will most probably read as REG_SZ.
5) Double click on it.
6) Copy to clipboard contents CTRL + C
7) Click Cancel
Delete whole entry
9) Edit, Add Value
10)Enter CPATH
11)CTRL + V (to copy contents of clipboard back)
12)Change TYPE to REG_EXPAND_SZ
13)Click OK - exit - Reboot

As always when doing registry edits, back it up first!!

Hope this helps,
Louise

Collapse -

Relsolving %systemroot% variable in PATH

by A Fuchigami In reply to Relsolving %systemroot% v ...

The question was auto-closed by TechRepublic

Collapse -

Relsolving %systemroot% variable in PATH

by -Q-240248 In reply to Relsolving %systemroot% v ...

Maybe you're looking for %winroot%?

Collapse -

Relsolving %systemroot% variable in PATH

by A Fuchigami In reply to Relsolving %systemroot% v ...

The question was auto-closed by TechRepublic

Collapse -

Relsolving %systemroot% variable in PATH

by A Fuchigami In reply to Relsolving %systemroot% v ...

This question was auto closed due to inactivity

Back to Windows Forum
5 total posts (Page 1 of 1)  

Operating Systems Forums