SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Changing Where The SQL Server Tools Are Installed

By Brian Knight, 2001/05/11

Total article views: 2749 | Views in the last 30 days: 0
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!

By Brian Knight, 2001/05/11

Total article views: 2749 | Views in the last 30 days: 0
Your response
 
 
Related tags
 
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com