> %LOG_FILE%setup.exe /ConfigurationFile=SQL_uninstall_ConfigurationFile.INI /Qset EXIT_CODE=%er">

SQL Server卸载脚本

来源:这里教程网 时间:2026-03-02 10:37:42 作者:
@echo off
set LOG_FILE=%cd%\setup.log


echo "----------Begin to uninstall SQL Server services-----------" >> %LOG_FILE%


setup.exe /ConfigurationFile=SQL_uninstall_ConfigurationFile.INI /Q 


set EXIT_CODE=%errorlevel%
if %EXIT_CODE% neq 0 (
echo "Uninstall MSSQLSERVER failed." >> %LOG_FILE%
goto END
)


echo "-----------Uninstall SQL Service successfully----------" >> %LOG_FILE%


:END
exit %errorlevel%

相关推荐