靜默安裝SqlServer2008指令碼
在命令列或者批處理檔案中執行“setup.exe /ConfigurationFile=ConfigurationFile.INI
/Q”命令即可。“/ConfigurationFile”參數列示使用配置檔案,“/Q”參數列示靜默安裝無需使用者互動。
@echo off
setlocal EnableDelayedExpansion
set LOG_FILE=%cd%\setup.log
echo "--------------Begin to install SQL Server---------------" >%LOG_FILE%
"C:\Program Files (x86)\WinRAR\winrar.exe" x SQL2008.7z >> %LOG_FILE%
set EXIT_CODE=%errorlevel%
if %EXIT_CODE% neq 0 (
echo "Extract 7z file failed." >> %LOG_FILE%
goto END
)
echo Y|cacls C:\SQL /T /P Administrators:F SYSTEM:F
set EXIT_CODE=%errorlevel%
if %EXIT_CODE% neq 0 (
echo "Cacls files failed." >> %LOG_FILE%
goto END
)
setup.exe /ConfigurationFile=SQL_install_ConfigurationFile.INI /Q
set EXIT_CODE=%errorlevel%
if %EXIT_CODE% neq 0 (
echo "Install SQL Server failed." >> %LOG_FILE%
goto END
)
echo "-----------Install SQL Server successfully-------------" >> %LOG_FILE%
:END
exit %EXIT_CODE%
@echo off
setlocal EnableDelayedExpansion
set LOG_FILE=%cd%\setup.log
echo "--------------Begin to install SQL Server---------------" >%LOG_FILE%
"C:\Program Files (x86)\WinRAR\winrar.exe" x SQL2008.7z >> %LOG_FILE%
set EXIT_CODE=%errorlevel%
if %EXIT_CODE% neq 0 (
echo "Extract 7z file failed." >> %LOG_FILE%
goto END
)
echo Y|cacls C:\SQL /T /P Administrators:F SYSTEM:F
set EXIT_CODE=%errorlevel%
if %EXIT_CODE% neq 0 (
echo "Cacls files failed." >> %LOG_FILE%
goto END
)
setup.exe /ConfigurationFile=SQL_install_ConfigurationFile.INI /Q
set EXIT_CODE=%errorlevel%
if %EXIT_CODE% neq 0 (
echo "Install SQL Server failed." >> %LOG_FILE%
goto END
)
echo "-----------Install SQL Server successfully-------------" >> %LOG_FILE%
:END
exit %EXIT_CODE%
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14710393/viewspace-1518365/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 靜默安裝19C RAC的指令碼指令碼
- windows靜默安裝Oracle11G指令碼WindowsOracle指令碼
- PackageInstaller 5.0原始碼分析靜默安裝與靜默解除安裝Package原始碼
- 靜默安裝SqlServer2008配置檔案--之三SQLServer
- 靜默安裝SqlServer2008配置檔案--之二SQLServer
- 靜默安裝SqlServer2008配置檔案--之一SQLServer
- Android靜默安裝和靜默解除安裝Android
- oracle單機靜默安裝指令碼oracleAutoInstall.shOracle指令碼
- Linux下利用指令碼靜默安裝Oracle11GLinux指令碼Oracle
- rac靜默安裝
- dbca 靜默安裝
- Oracle 靜默安裝Oracle
- Oracle靜默安裝Oracle
- Android靜默安裝應用和靜默解除安裝應用Android
- 靜默安裝Azure CLI
- 靜默安裝ORACLE(文件)Oracle
- oracle11g在linux7的靜默安裝指令碼OracleLinux指令碼
- oracle靜默安裝raw裝置Oracle
- 靜默安裝oracle時報錯Oracle
- ORACLE 11.2.0.4靜默安裝Oracle
- 靜默安裝oracle軟體Oracle
- Oracle靜默安裝(單機)Oracle
- 靜默安裝、建庫(轉)
- 靜默安裝ORACLE 軟體Oracle
- Oracle靜默安裝說明Oracle
- Android 靜默安裝/後臺安裝Android
- 【靜默】在RHEL 6.5上靜默安裝Oracle 18cOracle
- android apk靜默安裝和解除安裝AndroidAPK
- oracle 19C 靜默安裝Oracle
- Linux下靜默安裝OraceLinux
- 靜默安裝and手動建庫
- oracle 12c 靜默安裝Oracle
- Oracle 11g 靜默安裝Oracle
- 靜默安裝功能的實現
- 靜默安裝oracle10gOracle
- AIX 6.1 靜默安裝11.1.0.6AI
- oracle10g 靜默安裝Oracle
- Oracle 10g 靜默安裝Oracle 10g