Last active
October 11, 2015 17:08
-
-
Save tkMageztik/3891597 to your computer and use it in GitHub Desktop.
Get all local mssql server instances.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private string[] getInstances() | |
{ | |
Microsoft.Win32.RegistryKey rk; | |
rk = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft SQL Server"); | |
string[] s; | |
s = ((string[])rk.GetValue("InstalledInstances")); | |
return s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Obtiene las instancias instaladas de SQL Server, testeado hasta Windows 7.