靜默安裝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的指令碼指令碼
- Linux下利用指令碼靜默安裝Oracle11GLinux指令碼Oracle
- rac靜默安裝
- Oracle靜默安裝Oracle
- oracle11g在linux7的靜默安裝指令碼OracleLinux指令碼
- Linux下靜默安裝OraceLinux
- 【靜默】在RHEL 6.5上靜默安裝Oracle 18cOracle
- 靜默安裝and手動建庫
- oracle 19C 靜默安裝Oracle
- 靜默安裝oracle時報錯Oracle
- AnolisOS 7.9 靜默安裝Oacle 11.2.0.4
- centos 7.4靜默安裝oracle 19.3CentOSOracle
- Windows 7平臺靜默安裝11.2.0.4軟體及靜默建庫Windows
- 靜默方式安裝11gR2
- Oracle Linux 7.1 靜默安裝Weblogic 12.2.1.3OracleLinuxWeb
- win10如何禁止靜默執行_win10禁止靜默安裝方法Win10
- RedHat上靜默安裝Oracle11gRedhatOracle
- CentOS 7.2靜默安裝Oracle11gCentOSOracle
- redhat7.2靜默安裝Oracle11.2.0.4RedhatOracle
- CentOS 7.5靜默安裝Oracle 11gCentOSOracle
- 靜默方式安裝、升級oracle(一): 安裝oracle軟體Oracle
- 【11g 單庫解除安裝、靜默安裝】實驗
- 靜默安裝Oracle11g資料庫Oracle資料庫
- 靜默方式安裝oracle 11g 完整攻略Oracle
- oracle11g客戶端靜默安裝Oracle客戶端
- 靜默安裝Oracle資料庫11gOracle資料庫
- 應用黑名單以及靜默安裝的實現
- windows10系統禁止靜默安裝的方法Windows
- linux7 靜默安裝 11GR2 RACLinux
- Oracle Linux 7.1 靜默安裝Oracle 18c RACOracleLinux
- Oracle 19C的下載和安裝部署(圖形安裝和靜默安裝)Oracle
- RedHat 7 靜默安裝Oracle11g的補充RedhatOracle
- 19c(19.3) 單機資料庫靜默安裝資料庫
- 靜默方式安裝、升級oracle(二): 建立資料庫Oracle資料庫
- GoldenGate 12.3 MA架構介紹系列(5) - 靜默安裝Go架構
- 【配置安裝】靜默安裝Oracle資料庫軟體12c&19cOracle資料庫
- pyenv 安裝指令碼指令碼
- Android 流氓軟體靜默安裝是怎麼實現的?Android
- 阿里雲伺服器靜默安裝Oracle 11.2.0.4.0 -64bit阿里伺服器Oracle