Jump to content

Location of %PROGRAMFILES%


Speeddymon
 Share

Recommended Posts

Just curious, where is the value of %PROGRAMFILES% stored?

I think it is stored somewhere because nlite can change it, so that you can have your Program Files directory on a different drive.

Basically, what I am trying to do is have windows install with program files set to the default location, and then after install, change the value of %PROGRAMFILES% so that any new installs go to a separate drive, so that if I need to wipe out the windows install, I can just format C: and not lose any other installed programs. Currently I achieve installing to a separate drive by changing C: to D: in every new install, but a lot of times I forget, and have to go back and uninstall and reinstall.

Link to comment
Share on other sites


sorry i'm late :) this kind of settings generally stored in windows registry, open regedit and searh for %PROGRAMFILES%. It may be helpful.

Edited by efecan
Link to comment
Share on other sites

sorry i'm late :) this kind of settings generally stored in windows registry, open regedit and searh for %PROGRAMFILES%. It may be helpful.

Well if that is the case, do you happen to know if that is stored in the default registry hives that get populated during Windows install?

Link to comment
Share on other sites

  • 3 weeks later...

I believe %programfiles% is just a variable that stores the location of the program files folder.

What actually defines your program files location is a registry key called ProgramFilesDir found here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

What this means is that even if you change %programfiles% to something else, internally, Windows will NOT recognize this variable as the location of your program files folder.

You will also find the key ProgramFilesPath = %programfiles%.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...