SQLServerCentral Article

Changing Where The SQL Server Tools Are Installed

,

Have an older workstation with only a little hard drive space? Tired of the SQL Server tools taking about a hundred megs on your most precious drive? If you answered yes to either one of those questions, then this quick tip is for you.

The case often arises where you have to install the SQL Server client tools on a workstation that has less than the needed space or you don’t want the tools taking up all of your hard drive space. In SQL Server 2000, you have no control normally where the setup installs its tools. By default, it installs them under the C:\Program Files\Microsoft SQL Server\80\Tools. This path can vary depending on where your NT/2000 is installed. During the installation, you are not even presented the option to change this. Instead, SQL Server reads a registry key and installs the application off of the directory you have in the key.

This is the case with Windows NT, Millennium Edition and 2000. The registry key that is read is ProgramFilesDir in the following path:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\

There are two ways to change this. You can change it in

RegEdit in Windows, or through a program that was provided

by Gert Drapers at Cohesion Software. Gert was kind enough to provide a command line program that will set the key and show you the old key.

To use the program, simply go to the command line and type SetPF –g. This will show you the current path that is set. The -? switch will show you the other available parameters. Finally, the –s switch will set the registry key to a different path. For example SetPF –g “D:\Program Files” would change the drive to the D drive. Make sure that you set it back after you’re done.

After setting the registry key to a new setting, install the SQL Server tools or server and then set it back to the way it was previously BEFORE you reboot. This is because other functions like the System File Protection (SFC) is also swapped to that directory if you reboot.

Download SetPF.Exe

Special thanks to Gert for showing me the registry key and contributing the program!

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating