Q:

How to permanently change where MSSQL stores database information?

Using SQL Server Management console for SQL Server 2005 we go to 
Server Properties --> Database Settings --> 
change database default location from c:\blah\blah to E:\MSSQL\DATA

We restart the server and it should store all new databases in that directory at least in theory.  
Everything so far is ok, but when we restore the first databasename.bak file, it stores the information on the C:\Program Files\blah\blah\data directory instead.
Any idea on how to make this permanent even to restored databases?

A:

The database .bak file contains information about where the backed up database held its mdf and ldf files. My guess is that it was designed this way to make restores super simple. To restore a backup to different locations (i.e. the new locations you want), you need to use some slightly advanced features:

Using SQL Server Management Studio (see step 11)
Using Transact-SQL

