Management Studio default file save location

Viewed 102497

Open a new query window. Write some SQL. Save the script, the Save File As dialog box opens - but always to the same default location in the Profiles directory. Is there any way to set my default file location? ...Like I used to do with apps from the 1980s?

Under Tools|Options a default location can be specified for query results. I need the same thing for new queries (the text editor). Tried changing locations in the Registry but SSMS just overwrote my changes. Any suggestions?

(I saw this unanswered question at http://www.eggheadcafe.com/software/aspnet/30098335/management-studio-default.aspx and I had same exact question so I just reposted it here)

16 Answers

Just to make sure, did you update the locations in the registry here:

HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell

HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\General\ProjectLocationEntries

The installation location for SSMS 18 has changed, along with the location of the configuration file that controls the default file save location. The file that needs to be edited is now located at the following path:

C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Extensions\Application\ssms.Application.pkgdef

  1. Close all running instances of SSMS 18.

  2. Open ssms.Application.pkgdef with a text editor running with Administrator privileges.

  3. Change the value of DefaultProjectsLocation to what you'd like the default to be:

    • "DefaultProjectsLocation"="C:\My\Preferred\Save\Location"
  4. Save the file and restart SSMS.

As a workaround, you could create new Project of type SQLServerScripts at the location you wish to store the scripts.

Then in the solution explorer just right click the queries folder to create a new script at the location you have specified.

Make sense?

Fore more detailed about Projects and solutions in SQL Server see:

http://msdn.microsoft.com/en-us/library/ms173803.aspx

Cheers,

What helped me was editing the registry and Value for DefaultFileOpenLocation

HKEY_USERS\S-1-5-21-1428394981-1396028598-1721912238-1000\Software\Microsoft\SQL Server Management Studio\18.0_IsoShell

Registry Editor screen shot:

Related