c# - How to check if SQL Server Management Studio is installed on a system programmatically? -


i need find whether sql server management studio installed on system or not. need specially when instance of sql server express installed on system installing visual studio no management studio installed on system.

for more information, can find instances of sql server installed on system need understand management studio installed on system or not.

you can check registry key , see if returns null:

private registrykey _regsql = registry.localmachine.opensubkey             (@"hklm\software\classes\applications\sqlwb.exe", false);  if (_regsql == null) //if it's null  sql server management not installed {    //do } 

also 2 more registry locations can check:

hklm\software\microsoft\microsoft sql server\ssmsee software\microsoft\microsoft sql server\90\tools\clientsetup 

edit

according this documents, while using address software\microsoft\microsoft sql server\90\tools\clientsetup change the number part (90) based on versions want check:

90   | sql server 2008 100  | sql server 2008 r2 110  | sql server 2012 120  | sql server 2014  130  | sql server 2016 140  | sql server 2017 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -