Into Windows

  • Home
  • Windows 11
  • Windows 10
  • Windows 7
  • Privacy
You are here: Home » Windows 10 » Change Default Installation Directory In Windows 10/8/7

Change Default Installation Directory In Windows 10/8/7

Last Updated on July 21, 2019 by admin 51 Comments

By default, Windows installs all the programs in C:\Program Files or C:\Program Files (x86) directory depending on the type of Windows 10 and the program you are installing.

You might want to change the default installation directory if your “C” drive is running out of free space. While some programs allow you to select the install drive and directory, most programs don’t offer the option to select installation drive. For instance, setup of antivirus programs like Kaspersky Internet Security and Norton doesn’t offer an option to select the default installation directory during the product installation.

If you want to change the default installation location of programs in Windows 10/8/7, there is an easy workaround. You just need to edit the registry to change the default installation directory or path. And if you want to move installed programs, please refer to our how to move installed programs to another drive in Windows 10 guide.

To start with this guide, make sure you have enough free space in your new directory which you are going to make as default one.

You need to do a small registry change in order to change your default installation directory as follows:

Changing the default installation directory

IMPORTANT: We recommend you create a manual system restore point or backup registry so that you can easily restore original settings if required.

WARNING: This is an advanced guide. So, proceed at your own risk.

Step 1: Type Regedit in Start menu/taskbar search box or in the Run dialog box and hit enter key to continue.

Step 2: Navigate to the following registry key in the Registry Editor:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

Step 3: On the right side, locate the value named “ProgramFilesDir” and change the default value “C:\Program Files” to your new directory path (address).

change default installation directory Windows 10 pic1

change default installation directory Windows 10 pic3

Next, find ProgramFileDir (x86), double-click on it and change it value data to a location where you want to install programs by default.

change default installation directory Windows 10 pic2
Step 4: Finally, close the Registry Editor and reboot your system to apply the change. You might need to restart your computer to apply the change. Download a program and try to install it and check if it’s installed in the new installation directory.

If you are experiencing any issues, please restore Windows 10 to an earlier date using the previously created restore point.

PS: This tweak should work fine with Windows 7 and Windows 8/8.1 as well.

Don’t forget to check out how to move installed apps to another drive in Windows 10 guide.

Filed Under: Windows 10 Tagged: Windows 7, Windows 7 how to

Related Posts

  • Change Default Install Location Of Programs In Windows 10
  • 8 Free Software To Change Default Windows Icons
  • Change The Default Location Of SkyDrive Folder In Windows
  • How To Change The Default Font In Windows 10
  • How To Change The Default Printer In Windows 10
  • How To Change The Default Browser In Windows 10

Comments

  1. Patrick Sullivan says

    July 11, 2017 at 8:50 am

    I would highly advise to either NOT do this, OR to change the path BACK to the original (program files/program files (x86)), ESPECIALLY the 64-bit path back to C:\Program Files, because if the default path is NOT here, then Windows updates will constantly fail as it tries to install them to your set default installation path.

  2. Thomas says

    April 27, 2017 at 2:08 am

    I used this after installing windows on my brand new pc. Works for about half the programs i installed, the others just use hardcoded C in the installer.

    But that’s not the biggest problem. The biggest problem is – this breaks windowsupdate. Error 0xc1900204 is caused by this, and undoing it fixed the error for me.

    I’m never doing this again, SO much easier just to change the letter during installation every time.

  3. sa says

    May 28, 2016 at 11:06 am

    Thanks

  4. Fabio says

    May 26, 2016 at 6:14 am

    Here’s a different procedure that worked perfectly for me.

    Create a *.bat file in the same folder of your *.exe installation file.
    Edit the *.bat file with the following content:

    .exe TARGETDIR/INSTALLDIR=”E:\Program Files\”

    I’m not a computer expert… don’t know if it will work for everyone.

  5. Dissociating522 says

    April 21, 2016 at 8:46 pm

    @TIBS
    I never had problems with this after having installed plenty of software and then switching in the afterwards

  6. Jonas T. Dralle says

    January 10, 2016 at 3:01 pm

    I developed an app to simplify this progress

    1. Download Install Dir Changer
    2. Use it to change the default installation folder
    3. Profit

    It’s a very small application (< 100 KB) and is open source.
    You can download it on SourceForge.net

    sourceforge.net/projects/install-dir-changer

    Hopefully this helps you guys 8)

  7. prince says

    December 28, 2015 at 7:02 pm

    help me I have already change window path and reboot it in regedit menu but now many program doesn’t run in computer advance setting dnt work it show unidentified path help me what I can do plzz

  8. Jake says

    December 9, 2015 at 8:05 am

    This does not work. At all.

  9. TIBS says

    November 8, 2015 at 3:00 am

    Clueless. First thing this should say is to ONLY do this if it’s the VERY FIRST THING YOU CHANGE after a CLEAN install of Windows. If not, expect mayhem, as MANY programs refer to the default variable to know where they themselves are installed after the event. In other words, a lot of software will fail to function as normal, if at all, after changing this setting.

    On top of this, Kaspersky, for one, does not even get ‘fixed’ by this anyway! Brilliant.
    If you want a true way of doing that, you could always just go for the plain and simple:
    kis16.0.0.614en-gb.exe /p”INSTALLDIR=X:\PILLOCK”

    Done.

    Please, do not offer yourself as some sort of guru when you could quite easily screw someone’s installation of Windows beyond their own limits of recovery.

  10. Dean says

    August 26, 2015 at 10:59 pm

    How do you undo this? I changed this last night, now half of my programs will not open. Regedit will not work. Even tried putting in Windows CD to repair without any luck. Please help

  11. John Snow says

    August 26, 2015 at 1:03 am

    @John yes, office 365 (click and run) will install into the program files dir you set in regedit.

  12. John Stark says

    July 10, 2015 at 7:55 pm

    Will this approach work with Windows 8.1 and installing Office 365 to a Drive other than “C”?

    Please advise. Thank you.

  13. Frank says

    April 16, 2015 at 6:13 am

    When I change the registry values, can I leave it as the root of the drive (eg. “D:\”) or does it need to exist in a path (eg. “D:\Stuff 32bit”)?

  14. Mike says

    December 23, 2014 at 7:33 am

    OMKAR says

    3.i go to programfilesdir and change the default location to D/:program files
    and also change the location of program files(*86) to D/:program files (*86)
    – – –
    Fix your registry typos, it should work better:
    D:\ NOT D/:
    program files (x86), NOT program files(*86)
    D:\program files (x86) NOT D/:program files (*86)

  15. Johan Eriksson says

    December 11, 2014 at 6:07 pm

    I tried to do this but via another tutorial and now I need help.

    When I try to open alot of programs like regedit it says that it cant find C:\Windows\regedit.exe and there is not a single file in the my other D:\ drive.

    Please help

  16. OMKAR says

    July 21, 2014 at 1:22 pm

    i did this
    1. Type “regedit” in Vista start menu search box or in Run dialog box (for XP) and hit enter to continue.
    2. Navigate to the following registry key in the Registry Editor:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
    3.i go to programfilesdir and change the default location to D/:program files
    and also change the location of program files(*86) to D/:program files (*86)
    4.i closed the registry and reboot pc
    but now my pc says that WINDOWS CANNOT ACCESS SPECIFIED DEVICE,PATH, OR FILE.YOU MAY NOT HAVE APPROPRIATE PERMISSION TO ACCESS THE ITEM
    I EVEN CANNOT INSTALL ANYTHING
    EVEN REGEDIT.EXE IS ALSO NOT OPENING.THE FOLLOWING MESSAGE COMES AGAIN & AGAIN ,PLEASE HELP.i also have copied all the files of programs files to program files d drive.my installed apps can be opened but new softwares cannot be installed.

  17. Zardiw says

    January 7, 2014 at 2:37 am

    You really only need this for programs that don’t give you a choice where they install.

    I made the above changes to the registry (actually changed both with Run/Regedit and the Wow64 regedit) .

    Then installed Skype.

    Then changed them back.

    Actually %SystemRoot% is the Windows directory (Windows on most installations), so all you need to do is navigate to C:/Windows/SysWOW64/regedit.exe to get to the 64bit version.

    The reason most shortcuts don’t work after you change the default install directory is that they point to a registry key, not the actual executable.

    After I changed the directories back to normal, the shortcut that Skype created didn’t work……..so I just created a new one from Skype.exe inside the install folder.

    Also it really helps to be able to make image backups of the C drive with Acronis.com

    z

  18. Mandy says

    November 27, 2013 at 1:27 am

    How do I undo this? I changed my c drive default to our server default and now I can’t even get back into the ‘regedit’ as it says it no longer works AND I can’t get on to the internet without going into the program files! HELP!

  19. MrHIDEn says

    November 24, 2013 at 9:54 pm

    How to change Windows 7 “Program Files” and “Program Files (x86)” destination folders.
    In the registry find two branches. Some suggest only one but other entry is hidden in Wow6432Node as well and to make live easier must be allso edited.
    “C:\” to “D:\” or what ever you need.

    1
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\

    2
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion

    I would consider to take a look here as well.
    3 be careful
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment

  20. Rena says

    February 22, 2013 at 7:56 am

    I was wondering if you ever considered changing the structure of your
    site? Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content
    so people could connect with it better. Youve got an awful lot of text for
    only having 1 or two images. Maybe you could space it out better?

  21. Ben Nash says

    January 16, 2013 at 10:00 pm

    Does anyone know how to do this for Windows 8? I cant find how to do it and my SSD for the OS is rapidly filling up…

  22. Tanel says

    November 4, 2012 at 11:58 pm

    Hello! It is all great .When i installed a program after changing the registry the shortcut wouldnt open. The program itself was installed on x:/Programs but shortcut said it was x:/Programs (x86)… Do i have to change all future program shortcuts? Or is there another way?

    In registry i only changed the disc name from C to X.
    On both regedits.

  23. RonCam says

    October 7, 2012 at 5:18 pm

    @sarthak:”Now many of my programs are not opening and many links like advanced system properties says something like syntax is incorrect!
    what should i do?”

    For anyone following this tread on a search, I would say — use symbolic links. someone mentioned this earlier in the thread. In light of everything that follows that, I suspect that poster had the right answer.

  24. Sarthak says

    September 15, 2012 at 5:04 am

    Hey guys!
    I accidentally changed the windows path while changing temp path and rebooted my computer!
    Now many of my programs are not opening and many links like advanced system properties says something like syntax is incorrect!
    what should i do?

  25. MasterTx says

    June 5, 2012 at 9:09 pm

    Can we make it dynamic? The installing program should ask the destination folder instead of the static program location?

  26. steve says

    May 10, 2012 at 2:34 am

    im looking for a version of this for vista ultimate 64.

  27. Alexander says

    January 11, 2012 at 11:08 pm

    There are some potential issues with this modification: http://support.microsoft.com/kb/933700

  28. BigPossum says

    December 31, 2011 at 10:57 pm

    I have Dell Studio Laptop 1737. I just bought new 64 GB SSD. Want to clean install Win 7 onto it. This drive will only be used for the OS/Recovery files. I plan to then take my existing 500 GB mechanical HD, format it, and install it in second HDD bay. Would like all program and data files on this 2nd HDD. Not sure about if all programs will be allowed to do this, ie, antivirus programs and MS office. Any suggestion? Need detailed instructions please.

  29. Lantis says

    November 19, 2011 at 3:09 pm

    When I followed this tutorial, I couldn’t see the folder I chose as installation folder after restarting my system. It just disappeared and as I checked – IT WAS NOT INVISIBLE. I had to reset the installation drives to default and there you go – visible again!

  30. Discent says

    November 10, 2011 at 2:58 am

    While I was following these instructions I apparently did it in the dumbest way possible. I didn’t back up my registry beforehand and now am in a rather tight bind…
    http://imageshack.us/f/252/immensestupidity.png/
    I modified the circled box to a folder on my desktop and probably didn’t even manage to that correctly. Now when I turn my computer on I get six beeps in a row (due purely to this).Any advice? Thanks regardless.

  31. dwtjan says

    November 7, 2011 at 9:13 pm

    2nd CORRECTION to Redirecting Installation Path. Now have double folders in new location:

    I used a directory printer to try and compare what is in each of these folders. This is how the program showed the name of the folder with a second one within:

    P:\Program Files\Program Files
    P:\Program Files (86)\Program Files (x86)
    P:\Program Files (x86)\Program Files (x86)

  32. dwtjan says

    November 7, 2011 at 4:47 pm

    CORRECTION to Redirecting Installation Path. Now have double folders in new location:

    After doing maintenance and completing system scans I went back to pull up both versions of REGEDIT.

    My missing directory paths were now back. So the majority of my questions in my previous post are now
    no longer needed.

    My basic question I need to ask is still concerning how to get rid of a file within a file in each of my 3 P:\Program Files folders?

    Also, should I have a third P:\Program Files folder because I have Win 7 64-bit?

    Hopefully this will be easier to answer than the ones about disappearing Regedit paths! Thanks!

  33. dwtjan says

    November 7, 2011 at 4:13 pm

    I redirected the installation path for my Program Files from C:\ to P:\ following the directions
    from all the posts shown in the topic at intowindows.com/change-default-installation-directory-in-windows-7-vista

    I have Windows 7 Home Premium 64-bit so I followed the suggestions for my system using the following
    information:

    The end result was I did not use the regular REGEDIT but the one suggested by typing in Run:
    %systemroot%\syswow64\regedit. Then HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion.

    I changed the four things suggested: dir; dir (86); ProgramFilesPath; and ProgramW64 to P:\.

    There are several things going on since I did this to make me question some of the changes I made.
    First, was it really necessary or an advantage in any way to use %systemroot%\syswow64\regedit
    instead of the regular Regedit? Were there any disadvantages by using this version of Regedit?

    I understood that I now was to have a P:\Program Files and a P:\Program Files (x86).

    What I ended up with is:

    P:\Program Files; P:\Program Files
    P:\Program Files (86); P:\Program Files (86)
    P:\Program Files (x86); P:\Program Files (x86)

    I believe I figured out that I have two folders in each category because I made a folder in the new P:\
    drive to copy everything from C:\ into instead of just copying it the the P:\ drive without indicating a folder. (If this is correct, this information should be updated in the original directions I followed for
    people like me that have to have things spelled out.)

    I have no clue why I have the third Program Folder: P:\Program Files (86); P:\Program Files (86).
    If I am not supposed to have this one, how would I get rid of it or put it back?

    My next question is, how do I get just the one folder in each of the new locations, whether it is two or three locations? Get rid of the folder within the folder? Or would it just be easier (or perhaps the only way) to format and re-install Windows and start from scratch?

    I tried to pull up both versions of Regedit to see what was showing and perhaps changing things back to C:\. The Regedit version suggested for 64-bit was not even there. The error message said perhaps it had been moved. Which I’m sure I did, but do not know how to locate it. The regular Regedit did not show anything at all for the things I redirected.

    I redirected my program files using the regular Regedit once prior to this time, which I had formatted and re-installed Win 7 so thought I’d do an even better job using the one supposedly for 64-bit. The first time using the regular Regedit allowed me to go back in and change them back to C:\ from P:\. I was trying to re-install using the Recovery Partition, which required I put the installation path back to C:\ before I could. If I ever need to (and I will) re-install Win 7 again, I would now have to use the system image as there is no where I can see to change things back. If the system image goes wrong, it appears I’ll be up a creek. I finally discovered how I could make recovery disks but am unclear whether I would need to change the P:\ back to C:\. I don’t think so, but I am pretty confused at this point.

    I did a complete system image prior to installing Acronis Disk Director and partitioning, then redirecting the installation path. Six DVDs. I’ve never had any success backing up anything. I have never tried a system image restoration, so not sure how reliable they are. I really just want to set everything up as
    customized and streamlined as possible and attempt a complete system image containing the way I’d
    want Windows to load up just the pre-installed programs of my choice, not theirs. Without unnecessary
    duplication of files or folders.

    Would anyone be able to solve any of my questions? I know this will work just great once I’ve worked out the wrong turns taken! Thanks for any help!!

  34. phunktional johnkey says

    October 21, 2011 at 3:35 pm

    @ Jay: Nice 1! I was on my last strand of hair untill I saw this.

  35. lordkoos says

    October 14, 2011 at 1:05 am

    The 64bit version of Win7 has two versions of regedit. Make this change as well:
    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) to the new path, probably just changing the drive letter.

    This is the correct fix !

    You shouldn’t have to make the changes to the normal regedit, just the %systemroot%\syswow64\regedit.

    As stated above you will need to change both the ProgramFilesDir & ProgramFilesDir (x86).

    Caution! If you changed the regular regedit ( found by typing regedit in search box on start menu) by making changes to the path in regedit, some programs that you have installed on your OS drive (SSD) will not start. You can correct that problem by right clicking the shortcut in the start menu under all programs….right click, properties, and change target path. However, the only program I couldn’t change to correct target was Windows Media Player and as a result WMP would not function….I could fix that by going through windows explorer and finding the shortcut and pinned that to both start menu and taskbar. WMP would now function, UNTIL I tried using it in internet explorer then an error screen came up stating connection problems…..

    Basically….. If you’ve changed the regular regedit ProgramFilesDir and ProgramFilesDir (x86), change it back and make the changes to the %systemroot%…….

  36. matt says

    September 24, 2011 at 11:48 pm

    THIS IS AWESOME…JESUS! I’ve spent months looking for this.

  37. LambosWebs says

    August 10, 2011 at 9:51 pm

    @Jay, Thanks, I’ve Been Looking For That For A Long Time, Your The Best ;)

  38. Hiba says

    May 23, 2011 at 4:41 pm

    Hi Jay,

    regarding the win 7 registry change, what if i want to delete the programs from there, so that i have more space in the C drive. I mean what is the point of moving them to another location while they are still in one location. Doesn’t it take more space?? or should i uninstall the programs after i do that reg change and then re install it so that it installs in the prefered location

  39. Ben says

    January 13, 2011 at 5:21 am

    @Jay Lemmon

    Works perfectly! Thanks a bunch! :D

  40. Josh says

    November 12, 2010 at 10:53 am

    Anyone try to create a Symbolic Link

  41. Maarten says

    November 6, 2010 at 4:20 pm

    I want to install programs I ad to my computer later, in a different map. And I want them to separated from the standard program files. How can I accomplish that?
    Thanks!

  42. josè says

    September 18, 2010 at 7:13 pm

    Thank you Jay, your advise’s worked perfectly.

  43. Brian says

    January 7, 2010 at 7:18 pm

    Thank you Jay, this is exactly what I was looking for!

  44. Jay Lemmon says

    January 6, 2010 at 1:20 am

    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.

  45. Bob Fry says

    November 29, 2009 at 9:53 pm

    Changed it, rebooted, new installs still go to c:

  46. admin says

    August 10, 2009 at 1:04 pm

    Sorry for the inconvenience, Polly. At the same time I am not aware of any other workarounds for this.

  47. Polly says

    August 8, 2009 at 10:05 pm

    Not realy a usefull instruction. Has changed the register entry (ProgramFilesDir) in my a new installation directory. Still when i’m installing Ultra ISO and Crysis, the setup will automatically pick the c:\program files directory. Also tried to change the program files (x86) entry but then IE wont work, and as stated above probally WMP wont work either.

    Is there a other solution for this?

  48. Sal says

    July 25, 2009 at 10:15 pm

    True I just did the mod in win7 and WMP didn’t work any longer.
    Also if you make the changes in regedit it only modifies the 64 registry. Therefore anything installed in the x86 program files still default to original c: program files…
    Unless you also change the 32bit registry.
    But like mentioned by JC it breaks other things therefore not really worth it. Hopefully there is a way around it.

  49. admin says

    July 20, 2009 at 11:04 am

    Thanks for the update. I will look into to the issue and update here.

  50. jc says

    July 20, 2009 at 7:15 am

    One problem. Doing this (at least in Windows 7) breaks Windows’ directory awareness of programs that are already installed (errors with WMP and others)

  51. Deyaa Addeen Fahmy Shedeed says

    November 9, 2008 at 2:10 pm

    Good,thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

Advertisements

Search Into Windows

Recent posts

  • 5 Ways To Go To Desktop In Windows 11
  • How To Show Battery Percentage On Taskbar In Windows 11
  • Fix: AMD Software Adrenalin Edition Not Opening In Windows 11
  • How To Show Year On Windows 11 Taskbar
  • Windows 11 24H2 Is Available Now
  • How To Create 7z & TAR Files In Windows 11 Without Using Additional Apps
  • How To Remove Bell Icon From Taskbar In Windows 11
  • How To Reinstall Windows 11 Without Losing Apps And Files
  • How To Hide/Show Files & Icons On Desktop In Windows 10/11
  • How To Show Hidden Icons On Taskbar In Windows 11

About us

  • About Us
  • Contact Us
  • Privacy Policy

Copyright © 2025 · Into Windows