Get SQL installation location

xiaoxiao2021-03-05  23

method one:

// read the registry, obtain the installation path of sqlserver RegistryKey pRegKey = Registry.LocalMachine; pRegKey = pRegKey.OpenSubKey ( "SOFTWARE // Microsoft // MSSQLServer // Setup"); Object SqlPath = pRegKey.GetValue ( "SQLDataRoot") ;

转载请注明原文地址:https://www.9cbs.com/read-36153.html

New Post(0)