dred Posted June 17, 2008 Share Posted June 17, 2008 I didnt write this but wanted to share becuase i thought it was cool and usefull, maby we can mod it and add to it Install IIS, ASP.NET, .NET Framework 3.5, SQL Server 2005 Express /w Reporting Services, a Web Application, create the Web Application database, and Deploy Report files using a batch script ************************************** The Full Batch Script ************************************** @echo # Installing IIS sysocmgr /i:%windir%\inf\sysoc.inf /u:"%CD%\iis\iis_install.txt" echo off :loopIIS tasklist | find /i "sysocmgr.exe" >nul if %errorlevel% EQU 0 ( ping 127.0.0.1 -n 3 >nul goto loopIIS ) echo on @echo # Installing .NET Framework 3.5 DotNet\dotNetFx35.exe /qb /norestart echo off :loopDOTNET tasklist | find /i "dotnetfx35.exe" >nul if %errorlevel% EQU 0 ( ping 127.0.0.1 -n 3 >nul goto loopDOTNET ) echo on @echo # Installing SQL Server 2005 Express w/ Reporting Services SQL\SQLEXPR_ADV.exe /settings "%CD%\SQL\sql_install.ini" /qb echo off :loopSQL tasklist | find /i "setup.exe" >nul if %errorlevel% EQU 0 ( ping 127.0.0.1 -n 3 >nul goto loopSQL ) echo on @echo # Modify the Surface Area Configuration to allow remote connections "%programfiles%\Microsoft SQL Server\90\Shared\sac.exe" in "%CD%\SQL\sqlsac.out" -F -DE -BS -N @echo # Grant NT Authority\Network Service RSExecRole "%programfiles%\Microsoft SQL Server\90\Tools\Binn\osql" -E -S .\SQLExpress -i "%CD%\DatabaseScripts\GrantNTAuthoritySQLRS.sql" :loopNETWORKSERVICE tasklist | find /i "osql.exe" >nul if %errorlevel% EQU 0 ( ping 127.0.0.1 -n 3 >nul goto loopNETWORKSERVICE ) @echo # Installing Database "%programfiles%\Microsoft SQL Server\90\Tools\Binn\osql" -E -S .\SQLExpress -i "%CD%\DatabaseScripts\install.sql" :loopDATABASE tasklist | find /i "osql.exe" >nul if %errorlevel% EQU 0 ( ping 127.0.0.1 -n 3 >nul goto loopDATABASE ) @echo # Installing Application Files @echo # Create the Virtual Directory in IIS VirtualDirectoryInstaller.exe echo off :loopWebApp tasklist | find /i "VirtualDirectoryInstaller.exe" >nul if %errorlevel% EQU 0 ( ping 127.0.0.1 -n 3 >nul goto loopWebApp ) echo on @echo # Copy the web application files to the new virtual directory xcopy "WebApp\*" "C:\inetpub\wwwroot\WebApp\*" /C /E /H /R /Y @echo # Deploy the Reports "%programfiles%\Microsoft SQL Server\90\Tools\Binn\rs.exe" -i "%CD%\Reports\ReportsDeploy.rss" -s http://localhost/reportserver$sqlexpress @echo # Restart SQL Server for changes to take effect net stop "SQL Server (SQLEXpress)" && net start "SQL Server (SQLExpress)" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.