0

in order to enable the dark theme to SSMS (not available on the picture below as you see):

enter image description here

following this webpage:

SQL SERVER Management Studio 18 - Enable Dark Theme - SQL Authority with Pinal Dave

there are clear instructions as how to add the darktheme to SSMS. It works, but needs to be done manually.

enter image description here

now on this site below, there is the same set of instructions plus a way to get it done via powershell, as I have added here below, and it works, but powershell needs to be run as administrator.

Setting up the dark theme in SQL Server management studio (sqlshack.com)

Depending on the version of SSMS, copy the appropriate script into the clipboard, paste it in PowerShell and hit Enter to execute it:

SSMS 2016

powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef') -replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef'"

SSMS 17

powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef') -replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef'"

SSMS 18

powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef') -replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef'"

Powershell as administrator running the command above:

enter image description here

Now my question, I am not sure whether it is possible or not. Basically I would like to find out where these SSMS settings are saved, and change them preferably via powershell:

  1. set the colour Theme as Dark
  2. Items shown on the windows menu - currently 10, I would like to change that to 24

is it at all possible?

I have many servers where SSMS lives, and I would like to set them all to the same settings.

I am wondering if I could get this done using SendKeys.

that added the dark theme - made it available for me to choose it as you can see on the picture below.

enter image description here

1
1

Thanks to David Browne,

I used procmon and could find the settings are stored in the below regedit section,

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\SQL Server Management Studio\18.0_IsoShell\General

MRUListItemCount

WindowMenuItemCount

Change these values to 1-24

1

You could use Process Monitor https://docs.microsoft.com/en-us/sysinternals/downloads/procmon to discover where SSMS stores these settings.

1
  • Thank you David, Process Monitor is really very useful Jul 19 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.