%SystemRoot% can't be resolved

  • Thread starter Thread starter Ross
  • Start date Start date
R

Ross

Hi there,
On my WinXP Pro, I can't simply run Windows commands without full path.
When I type "echo %PATH%",
I get the output "%SystemRoot%\system32; ...",
instead of "C:\windows\system32; ..."
But, if I type "echo %SystemRoot%",
I can get "C:\windows".

Any idea would be appreciated,
Ross
 
Ross,
if you're comfortable using the Registry Editor (Start / Run / REGEDIT.EXE),
I'd like you to try the following steps:

Start the Registry Editor.
Navigate to
HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Control\Session Manager
\Environment

In the right-hand pane, you'll see a list of environment variables. Locate
the entry for Path.
Is the Type for this entry set to REG_EXPAND_SZ?

If not, right-click on Path in the Name column, and choose Modify. This
will open up a window which will allow you to edit the entry's data section.
Copy the contents of the data section onto the clipboard (Ctrl-C).
Right-click on Path again, and choose Rename. Rename it to OLDPATH.

Now, click on the Edit menu, and select New / Expandable String Value. Name
this new value Path. Right-click on it, and choose modify. Paste the
contents of your old path statement into the Data section of this new path
variable (shift-insert).

Hopefully, that will fix things up for you.

Good luck!

--
Mike Kolitz MCSE 2000
MS-MVP - Windows Setup and Deployment

Remember to check Windows Update often,
and apply the patches marked as Critical!
http://windowsupdate.microsoft.com
 
You might want to go to Control Panel, System, Advanced and click on the Environmental Variables button. Click on Path in the lower window, then the Edit button and copy the string shown in the popup. Paste it to NotePad so you can easily see and examine the entire string. I suspect there is something not quite right with it, perhaps misplaced quotes or similar. If you are not sure then paste the string as a reply to this thread to get a second opinion.

--

Bill James
Microsoft MVP - Shell/UI

Win9x VBScript Utilities » www.billsway.com/vbspage/
Windows Tweaks & Tips » www.billsway.com/notes_public/
 
Do you have any idea what causes this sort of problem? We
have the same problem on some machines at one of our
customer's sites and yours is the only helpful answer I've
found on the subject. It appears to be caused by the
installation of some software, but we have installed the
exact same software many other places without this problem.

Thanks,

Andy
 
Andy Reynolds said:
Do you have any idea what causes this sort of problem? We
have the same problem on some machines at one of our
customer's sites and yours is the only helpful answer I've
found on the subject. It appears to be caused by the
installation of some software, but we have installed the
exact same software many other places without this problem.

Thanks,

Andy

I'm wondering if an installer is modifying the path and erroneously changing the data type of the registry value? Perhaps the last entry in the path will give a clue?
EDIT: Perhaps 'most recent' instead of 'last' since an addition to the PATH doesn't have to be at the end of the PATH statement.
My PATH statement is:

WinXP System1: (broken)
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\nuBuilder\PHP\

WinXP System2: (broken)
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Python26;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\nuBuilder\PHP\

WinVista: (working)
%SYSTEMROOT%\System32\;%SYSTEMROOT%\;%SYSTEMROOT%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

Looks like for me it might be nuBuilder or one of the items it installs: PHP. Worth investigating perhaps ;)

EDIT:
Ok, tested nuBuilder install (with included PHP) and standalone PHP install (php5.3.3 http://windows.php.net/download/). The nuBuilder install changed the PATH key type from Expandable_String to String. PHP did not.

Time to submit a bug report on the nuBuilder installer.
 
Last edited:
Back
Top