How to change the default Installation folder in Windows 7

Posted on 2010-01-06
Last Modified: 2012-05-08
I am using Windows 7 Professional 64bit and I have 2 hard drives. The hard drive Windows is installed on is a 32GB SSD, and may eventually run out of disk space if all my applications are installed on it. On XP, I was able to change a registry setting to change the default install folder for applications. When I tried to do this in Windows 7, a lot of windows applications lost their shortcut icon and the shortcuts no longer worked.

I then proceeded to install Google Desktop, which installed in C:\Program Files (x86). When it was done, the Shortcut also didn't work because it was pointing to my F:\Applications (x86) folder.

Has anyone successfully done this where it doesn't break existing items in Program Files and works for new software installs?
Question by:bdichiara
    LVL 5

    Assisted Solution

    The way that you used to do it in XP seems to work on the 32-bit Windows7, but not on 64-bit Version because there are two Versions on "regedit.exe" there.

    The Solution is, to change the registry in the second version either:
    1.) Enter into Start>Run: %systemroot%\syswow64\regedit
    2.) Go to: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion
    3.) Change the Path in DWORDs ProgramFilesDir, ProgramFilesDir (x86) from "C:\Program Files (x86)" to "F:\Program Files (x86)".

    Can you check whether the shortcuts that are not working use the %ProgramFiles% or %ProgramFiles64% anvironment variable. This will cause the shortcuts to fail.

    Consider copying all files from "C:\Program Files (x86)" to "F:\Program Files (x86)". Registry entries will still point to C:, but you can also change these, although this will take a lot of time.

    You can also install Win7 to F:
    LVL 17

    Assisted Solution

    Here's how to do it on Windows 7 x64. I've already tried it and it works.
    Open registry editor (run regedit and hit enter)
    Navigate to the following key:

    In the right pane you can see that you're able to change the installation path for x86 and x64 applications as you can see in the attached picture.
    LVL 22

    Expert Comment

    Am I missing something here...?
    Usually programs&games give you the option where to be installed.
    Google desktop is one exception.

    C:\Program Files (x86) is for x32 bit applications.
    x64 run them in a kind of 'virtual environment' and hence
    the need for another registry.Mess with these settings and you are in for it ...

    Also there are 3rd party tools that can transfer successfully your current
    programs from one drive to another.

    LVL 1

    Expert Comment

    Or simply move the pagefile to another disk to free disk space 8-))
    LVL 7

    Author Comment

    Ok, I think my mistake was I changed the entry for ProgramW6432Dir (below the one valued with %Program Files%) along with the other 2 mentioned in nimatejic's response.

    The reason I want this setup is because I bought an SSD for Windows and a 10k RPM 150 GB for applications. Yes I can specify in most installations where to install the files, however i'd rather not have to do that EVERY time, plus as you mentioned, there is some software that doesn't give the option where to install.

    After changing only the 2 entries and trying to install Notepad++, it still is defaulting to C:\Program Files (x86)\ as the install directory. Is it possible there is another location in the registry where this needs to be changed?
    LVL 22

    Expert Comment

    It will not work...
    x32 application uses one registry and x64 another.
    So when installing W7 x64  automatically fills the right registry keys.
    You can go on changing to the last registry entry and final result
    would be a dead application (in the best scenario).Program Files
    is off limits...

    LVL 17

    Expert Comment

    Have you restarted bdichiara after you applied different settings?
    LVL 7

    Accepted Solution

    Yes, I've rebooted. Actually, I found the solution here:

    There's a 2nd location where the folder names need to be changed. So far seems to be working, although it seems Microsoft decided the shortcut for Windows Media Player needed %Program Files (x86)% as part of the shortcut path. I changed that manually and everything's working fine now.
    LVL 17

    Expert Comment

    Great, glad you've sorted it out.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Image capture and Deploy method is consist on two phases. In our first phase we capture the image of windows from the PC in which Windows and others softwares are already installed. In second phase we deploy the created image on new PC in which we…
    One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now