Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing %PROGRAMFILES% variable

Status
Not open for further replies.

MichaelDell

IS-IT--Management
Sep 24, 2003
42
US
I have a Win2k Pro PC where the %PROGRAMFILES% variable is missing. Does anyone know where this is stored on the PC? I assumed it was HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment but it isn't.
 
Have you tried:

sfc /scannow

at the command line?
 
I believe that SFC is for verifying system files. Thanks anyway.
 
You could use the "set" command. Run "set /?" to see the documentation, or just type "set" to see your current environment variables.

Let us know your results!

X
 
The "SET" command sets a variable for that session. To see this, open a cmd window and type set Test=Test, then type "set". You will see the variable set. Close the cmd window and reopen it, type set and it is no longer there.

I actually remembered that the %PROGRAMFILES% variable is a Process variable that is dynamically generated during each logon and rather than a System, User or Volitale variable which are stored in the registry.

I might have the desktop tech try the SFC, but I am hesitant since the PC has a lot of custom software that is a pain to load if that causes an issue. However, it kind of makes sense that a system file that generates that variable is missing or overwritten.
 
I know you can set variables by right clicking my computer then go to properties, then click the advanced tab and click Environment Variables, in the systems Variables box i think you can add C:\program files in the path variable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top