How to use %ProgramFiles% in the Path environment variable?

I'm trying to add a folder to the system's Path environment variable.

i want to add %ProgramFiles%\SysInternals

to the existing path variable:

C:\PROGRA~1\Borland\Delphi5\Projects\Bpl;C:\PROGRA~1\Borland\Delphi5\Bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

So i go into place where you edit it:

http://i44.tinypic.com/30nhx4w.jpg

And i add my variable to the path:

%ProgramFiles%\SysInternals;C:\PROGRA~1\Borland\Delphi5\Projects\Bpl;C:\PROGRA~1\Borland\Delphi5\Bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

Then opening a new command prompt window the environment variable is not replaced with it's actual value:

Path=%ProgramFiles%\SysInternals;C:\PROGRA~1\Borland\Delphi5\Projects\Bpl;C:\PROGRA~1\Borland\Delphi5\Bin;C:\Windows\system32;C:\Windows;C:\Windows\Sy
stem32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Se
rver\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Pro
gram Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Windows\System32\WindowsPowerShell\v1.0\
...
ProgramFiles=C:\Program Files

Which you can see in the following screenshot:

http://i44.tinypic.com/b3ndz4.jpg


How to make it work?

Answer
Answer


Thank you for using the Microsoft Vista Answers Forum!

Try adding the folder to the system path without the “%” sign. Instead of typing  %ProgramFiles%\SysInternals   type  C:\Program File\SysInternals

Please reply and let us know if your issue is resolved or if you will need further assistance


David O
Microsoft Answers Support Engineer
Visit our and let us know what you think.
David O

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated February 5, 2021 Views 77,953 Applies to: