这个是命令行卸载sql server 2005,可能你需要知道sql server的安装路径,并在C#中调用命令行。To remove a default, stand-alone installation of SQL Server 2005 from the command prompt Insert the SQL Server 2005 installation media into the disk drive.Uninstall SQL Server, using the following syntax: Copy Code Start /wait <CD or DVD Drive>\setup.exe /qb REMOVE=SQL_Engine,Client_Components INSTANCENAME=<InstanceName>For the default instance, specify "MSSQLSERVER" for <InstanceName>. Using REMOVE=ALL to remove instance components also removes shared components: SQL Server Tools, Integration Services, and Notification Services.
里面有个键/值 为 UninstallString : C:\WINDOWS\IsUn0804.exe -f"C:\Program Files\Microsoft SQL Server\MSSQL\Uninst.isu" -c"C:\Program Files\Microsoft SQL Server\MSSQL\sqlsun.dll" -msql.mif i=MSSQLSERVER直接开进程调用.呵呵.
Insert the SQL Server 2005 installation media into the disk drive.Uninstall SQL Server, using the following syntax: Copy Code
Start /wait <CD or DVD Drive>\setup.exe /qb REMOVE=SQL_Engine,Client_Components INSTANCENAME=<InstanceName>For the default instance, specify "MSSQLSERVER" for <InstanceName>. Using REMOVE=ALL to remove instance components also removes shared components: SQL Server Tools, Integration Services, and Notification Services.
最保险的办法还是用安装盘上的MSI删除