Wednesday, December 12, 2007

Installing Google Earth to a different hard drive location.

Install programs other than Google Earth (sample video) to a different hard drive/folder location is easier: Often as simple as selecting advanced options (or similar) when installing your program, and specifying a location. (Note that some files will still likely end up under C:Documents and Settings though.)

google earth change drive screenshotFor Google Earth, I've heard some different methods for this, all revolving around setting the %ProgramFiles% Environment Variable to a different path---the location you want the Google Earth files to be installed instead of the path C:\Program Files. (If you don' t know why you would want to do this, here are some funny cat pictures.)

Here's what works best of the different methods to change the install location for Google Earth:

  1. Shut down any running programs;

  2. Modify the ProgramFilesDir to your desired path (see below);

  3. Install Google Earth;

  4. Change the ProgramFilesDir back to C:\Program Files (what it was before you changed it);

  5. Restart your computer and then work normally.

Regarding editing your registry: you can badly break your computer if you make a mistake. Don't do it if you aren't confident and methodical about it. (Again, if this isn't your cup of tea, here are some humorous cat pictures.)

Simpler, safer way to edit the Registry/regedit

Using this method, you will put your desired changes, as well as the current state of the registry, into text files, and then change their filetype so they will cause their contents to be entered into the registry when double-clicked. By first saving the current state of what you are changing, you can easily go back. Here's how it works:

In step 2 the easiest way to modify your registry is simply to cut and paste these four lines (one is blank) into a text file:

Windows Registry Editor Version 5.00


"ProgramFilesDir"="C:\\Program Files"
(Note that "Windows Registry Editor Version 5.00"---without the quotes---means you are using either Windows XP, Windows 2000, or Windows Server 2003).

Once you've saved that text file somewhere (remember where!) make a copy of it. In one of the copies, change C:\\Program Files to wherever you want the program to install, for example

"ProgramFilesDir"="Z:\\Software\\Install Folder" (or wherever you want---ALWAYS USE TWO BACKSLASHES \\ wherever there was one backslash before.)
Be sure that Windows Explorer Tools-->Folder Options-->View "Hide extensions for known file types" is unchecked before you do this next step: rename each text file from whatever.txt to whatever.reg (the "whatever" part can be anything you wish).

The file with "ProgramFilesDir"="C:\\Program Files" in it you'll use in step 4 to restore the setting, and the one with your chosen path you'll use to change the setting in step 2.

Once the files have been named with the .reg extension , all you have to do is double-click them (as if you were trying to open them--they will ask you to change your registry instead of opening) to change your registry. Rename them back to ".txt" files instead of ".reg" if you want to edit the contents (or drag and drop the filename into an open text editor).

If instead, you'd like to edit the registry directly, read on. Otherwise, you're ready to complete the process. Here's how to finish up (this is a repeat of the steps listed in the beginning of this article):

  • Step 1: Shut down any running programs;

  • Step 2: Run (by opening) the .reg file you created with the new/changed path. Your registry now has a new install path;

  • Step 3: Install Google Earth;

  • Step 4: Run (by opening) the other .reg file you've created, the one with the original path in it. Now the registry is returned to its original state;

  • Step 5: To finish, restart your computer and work normally. Ta-Dah!

Using the registry editor to edit the registry directly

If you want to change your registry the old fashioned way and edit the registry directly, go to Start-->Run and type "regedit" (without the quotes) in the box, click OK. Then navigate in regedit to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion and double click ProgramFilesDir and type in your new path.

Better than other methods for Google Earth?

Changing the registry works better than other methods. Mainly, I found some other methods of changing the %ProgramFiles% Environment Variable to a different path (such as using SET at a command prompt) didn't work well. And leaving the path changed breaks some programs already installed, notably Outlook Express (although changing it back and restarting will bring OE back to life).

In checking out the options for modifying this install, I noticed a lot of confusion and people looking for a workable method, so link to this post if it works for you so others can find it.

Other great Windows tips:


  1. Super! Simple, elegant, clears the haze from manipulating the "dark recesses" of Registry.

    Now, is there a way of changing where GE stores cache and other user-generated files?


  2. Like the tip about changing the registry by exporting and then modifying the text file. I'm going to do that for most registry changes from now on.

    Works well for Google Earth. Better than other things I've read.

  3. thanks a lot