Odd registry issue...

Alright so I installed Win7 Pro x64 and want to accomplish this simple task:
All I want to do is have Win7 select a different hdd other than C: as the default location for installing program files.

So this is what i did...

I created a new folder in my "D" drive called "Program Files"
I went went into the registry and made the following changes:
*changed "ProgramFilesDir(x86)" from "C" to "D"
*changed "ProgramFilesDir(x64)" from "C" to "D"

As expected it worked fine and new programs installed, by default would be installed in a separate drive.

Now, the problem I'm getting is now for some reason I can no longer defrag as well as access regedit.

When I try defragging I get "The diaolog could not be launched. Please try again." error.

When I try to access the registry, I get "Windows cannot find 'C:\Windows\regedit.exe'. Make sure you typed the name correctly and then try again."

The odd thing is I can go into the windows folder and SEE "regedit" file but even double clicking on that (normally or "run as admin") it STILL gives me that error!

Why not just manually change drive during installation you ask?
Reason being is this is a test so I know I can properly have this set up at my parents computer which I will also be installing Win7 for them and I want to keep the OS separate from any programs they will download over time.

Any ideas as to what went wrong?
18 answers Last reply Best Answer
More about registry issue
  1. Interesting....

    Will fire up a test VM and replicate. I'll post back if I find a solution.

    Edit: Strange.... couldn't replicate this in either the x86 or x64 copies of 7.
  2. Prophecy, I was mistaken, there is no line in the registry labled "ProgramFilesDir(x64)" only "ProgramFilesDir(x86)", "ProgramW6432Dir" and "ProgramFilesDir".

    Does anyone know the difference between all three? Im pretty sure "ProgramFilesDir(x86)" applies to all 32bit applications. I'm ASSUMING that maybe "ProgramW6432Dir" is for programs that work for either system and "ProgramFilesDir" is just for 64bit programs?

    Change the directory on those three and let me know if the following programs no longer work in the start menu:
    wordpad, mediaplayer, sidebar, explorer, dvd maker, PhotoViewer

    Then let me know if defrag and regedit work too.

    I reformatted my computer and made a ghost image of my drive so I'm going to try this again and hopefully figure out what went wrong.

    I'll keep you all posted...
  3. I believe you are correct in assuming what each of those keys control. I changed them according to how you described and saw no change in the operation of any start menu items, or the regedit and defrag utilities.
  4. Your right Prophecy I believe I know what my problem was.

    "ProgramW6432Dir" and "ProgramFilesDir" both save programs at "C:\Program Files" BUT only "ProgramFiles(x86)" saves programs at "C:\Program Files (x86)".
    My error in thinking was beleiving that I could redirect all 3 into "D:\Program Files"

    Seems that small error was enough to makes some things out of whack.

    So by ONLY changing the letter in both locations from

    "C:\Program Files" and "C:\Program Files (x86)"
    "D:\Program Files" and "D:\Program Files (x86)"

    This is the only way to do it to keep everything stable.

    Now I will take this one step furthur and make the same changes to
    "C:\Program Files\Common Files" and "C:\Program Files (x86)\Common Files"
  5. Ahhh... that makes sense now.
  6. EDIT: I changed my solution so it would make more sense, the method I concluded didn't change, just the way I wrote it may have been confusing.

    Also, changing the common files seems safe and everything is still stable.

    My next customization is this:
  7. Hmmm, even though initially all seemed well after I edited the registry.
    It seems that after you reboot, for some reason the following startmenu items go missing:
    windows dvd maker
    windows media player
    math input channel

    I know you said you were unable to replicate Prophecy, but do you mind testing this scenario on your VM?

    again these were the changes I made:

    ProgramW6432Dir" and "ProgramFilesDir"
    from"C:\Program Files" to"D:\Program Files"
    from "C:\Program Files (x86)" to"D:\Program Files (x86)"

    same goes for the common files

    CommonW6432Dir" and "CommonFilesDir"
    from"C:\Program Files\Common Files" to"D:\Program Files\Common Files"
    from "C:\Program Files (x86)\Common Files" to"D:\Program Files (x86)\Common Files"

    Hopefully you'll be able to replicate my issue!
  8. Sure... i'll give it another shot. Will post back when i've finished.
  9. Have either one of you figured out this solution yet? I'm trying to accomplish the same thing (Windows 7).
  10. No I've given up. I even looked at a couple books at Borders, you know, the know ones that say "Ultimate Windows 7 guide" and "Windows 7 secrets" and they werent any help either.

    Im seriously puzzled that no one else has wanted to try something like this. Especially for people who work on other peoples PC's as this would make backing up and restoring so much easier. But I digress, either someone who really knows their way around the registry will figure it out or maybe it'll be one of Windows 8's "new features" :sol:
  11. Best answer
    Good news! I have a solution that so far seems to work correctly for my 64-bit Windows 7 Home Premium. For example, after doing this fix, I installed Norton Internet Security 2010 - which does not let you specify where to install it (it just installs wherever the "default" Windows install is), and it properly went to the partition that I wanted. Everything else also seems to be fine. Here's what I did. I followed Jay Lemmon's instructions from:

    And here's the relavent part copied direction from his post:

    "Posted January 6, 2010 at 1:20 am | Permalink
    I got this working on Windows 7 64 bit. Here’s what I did:

    In addition to the registry keys in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion you also need to change the ones in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion.

    Then, you need to copy all the files in c:\Program files (x86) and c:\program files to where ever your new locations are. Then don’t delete the original directories, since not all programs are smart enough to make the switch.

    Obviously, this works best on a fresh install where the program file directories are only a few hundred megabytes.

    Any (well, most) new programs you install will figure out that your new location is the default program files directory."

    Basically I anywhere I saw C:\ in those two registry folders, I replaced it with P:\ (which is the partition to hold my programs). So I changed about 6 places in both of those folders. Here's 2 pix of the settings after I did them. If you have a gmail account or can otherwise log in to view google docs you should be able to view them. I hightlighted the registry folder I was in (Wow6432Node or the other one) and the actual changed items that I did:

    Don't forget to restart your computer after making the registry changes and before trying to install programs to your new default location. Unless you hear back from me, assume all is well with this solution. Thank you to Jay Lemmon.
  12. I should also note that I only had to change the C:\ to P:\ since I had copied all forms of the Program Files (x86 versions, etc) from the C drive to my P drive. Therefore the necessary files such as "common files" were already in place. See the pictures for what I'm referring to. Again, I was just following Jay's directions.
  13. Intersting, I'll test it out over the weekend and hopefully come back to you with no errors!
  14. Jlearn, the link you have posted is broken. I reformatted today and wanted to try out the registry edit but wanted a little more info and feedback on the forum you linked to...
  15. @Jlearn
    Caught a nasty virus on my OS and had to wipe it out. Luckily the link you gave me is back up and I am going to give this reg edit suggestion a shot today and hopefully I'll confirm your success : )

    I'll have an update later today...
  16. Alright! Reinstalled Windows 7 Professional x64 and made the regedit changes and SUCCESS! No problems with programs that were installed originally with windows and all new programs that I installed after the changes DEFAULTED to the second drive other than C:
    This is great news! Thank you JLearn for letting me know about this thread and even more thanks to Jay Lemmon for figuring it out!
  17. Best answer selected by Santimun.
  18. Nevermind, fixed what i was doing wrong.
Ask a new question

Read More

Registry Windows 7