由于最近要用到打包SQL Server 2005 Express Edition ,由于在安装过程中需要设置很多东西。带来很多的不便,于是在网上和MSDN找了好久终于找到办法了 ^_^
我用的是批处理来实现的,好了直接贴代码
CLS
@ECHO OFF
ECHO.
ECHO ===============================================================
ECHO 开始安装 SQL SERVER 2005 EXPRESS
ECHO 请不要关闭此窗口,等待安装过程结束......
ECHO ===============================================================
start /wait setup.exe /qn ADDLOCAL=ALL REINSTALLMODE=O INSTANCENAME=MSSQLSERVER SECURITYMODE=SQL SAPWD=XXXXXX SQLBROWSERAUTOSTART=1 DISABLENETWORKPROTOCOLS=2
ECHO ===============================================================
ECHO Enabling SQLServer default instance port 1433
netsh firewall set portopening TCP 1433 "SQLServer"
ECHO ===============================================================
ECHO Enabling Dedicated Admin Connection port 1434
netsh firewall set portopening TCP 1434 "SQL Admin Connection"
ECHO ===============================================================
ECHO Enabling conventional SQL Server Service Broker port 4022
netsh firewall set portopening TCP 4022 "SQL Service Broker"
ECHO ===============================================================
ECHO Enabling Transact-SQL Debugger/RPC port 135
netsh firewall set portopening TCP 135 "SQL Debugger/RPC"
ECHO ===============================================================
ECHO Enabling SSAS Default Instance port 2383
netsh firewall set portopening TCP 2383 "Analysis Services"
ECHO ===============================================================
ECHO Enabling SQL Server Browser Service port 2382
netsh firewall set portopening TCP 2382 "SQL Browser"
ECHO =============================================================== ......
转载于:https://www.cnblogs.com/zhangchenliang/archive/2010/04/13/1710708.html