Building an unattended WEBfactory 2010 installation
Check out this article and learn how to build an unattended WEBfactory 2010 installation.
An unattended installation is an install process that does not require the user's intervention after launching the installation.
Important
All commands must be run as Administrator, from the root of the WEBfactory 2010 installation disk!
To install WEBfactory 2010, Microsoft SQL Server 2008 and all the required prerequisites, the following steps must be followed:
Installing the Microsoft SQL Server 2008 prerequisites:
Windows Installer 4.5 (only needed for Windows versions older than Windows 7):
"WEBfactory 2010\WinInst\Windows6.0-KB942288-v2-x64.msu"
.Net Framework 3.5 SP1:
"WEBfactory 2010\NetFW\dotnetfx35.exe"
Windows Power Shell 2.0 (only needed for Windows versions older than Windows 7):
"WEBfactory 2010\PS2\Windows6.0-KB968930-x64.msu"
Installing the Microsoft SQL Server 2008:
"WEBfactory 2010\SQL2008\Setup.exe" /ACTION="Install" /ENU /INSTANCENAME="WEBfactory 2010" /SECURITYMODE="SQL" /SAPWD="WEBfactory 2010" /SQLSYSADMINACCOUNTS="Builtin\Administrators" /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ADDCURRENTUSERASSQLADMIN /QS /IACCEPTSQLSERVERLICENSETERMS
Installing the WEBfactory 2010 prerequisites:
"WEBfactory 2010\WEBfactory 2010_Prerequisites.exe" /q
Installing WEBfactory 2010:
msiexec.exe /qn /i "X:\WEBfactory 2010\WEBfactory 2010\WEBfactory 2010.msi"
where X is the drive containing the installation disk. Note that the full path to the installation MSI is required at this step.
Restoring the database:
sqlcmd -S [Server]\[Instance Name] -U [User ID] -P [password] -Q "RESTORE DATABASE {Database Name] FROM DISK='D:\[Database Name].bak'"
If the SQL Server is running on the local machine, use (local) as [Server].
Activating the database in the registry:
Open the Studio and open the desired database.
Go to Settings > Database Access and click on the DSN value to open the DSN Builder dialog.
Make sure that the desired database is selected and the User ID and Password are correct and click the Adopt current database of ... button.
Open the Windows Registry Editor and go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\WEBfactory\WFServer\2.00\Settings..
Export the key using the File > Export option. Name the registry key DSN.reg.
Only the DSN entry is required for this step. The other registry entries from the exported key can be removed. The required registry key should look like this:
In the Command Prompt/Batch file, run the following line in order to execute the exported registry key:
regedit.exe /s [path to the .reg file]
Copy the project folder to Internet Information Services (IIS):
xcopy "[Path to source project folder]" "C:\inetpub\wwwroot\_SERVICES\[Project Name]" /e /i
Activate the IIS application:
Activating the IIS application via command line is possible only on Internet Information Services (IIS) 7 or newer!
C:\Windows\System32\inetsrv>appcmd add app /site.name:[Default Web Site] /path:/[Project Name] /physicalPath:[Physical path of the project] /applicationPool:[Application pool name]
Batch file example:
@ECHO OFF "WEBfactory 2010\WinInst\Windows6.0-KB942288-v2-x64.msu" REM Installs the Windows Installer 4.5 (only needed for Windows versions older than Windows 7) "WEBfactory 2010\NetFW\dotnetfx35.exe" REM Installs the .Net Framework 3.5 SP1 "WEBfactory 2010\PS2\Windows6.0-KB968930-x64.msu" REM Installs Windows Power Shell 2.0 (only needed for Windows versions older than Windows 7) "WEBfactory 2010\SQL2008\Setup.exe" /ACTION="Install" /ENU /INSTANCENAME="WEBfactory" /SECURITYMODE="SQL" /SAPWD="WEBfactory 2010" /SQLSYSADMINACCOUNTS="Builtin\Administrators" /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ADDCURRENTUSERASSQLADMIN /QS /IACCEPTSQLSERVERLICENSETERMS REM Installs the Microsoft SQL Server 2008 with the required settings "WEBfactory 2010\WEBfactory_Prerequisites.exe" /q REM Installing the WEBfactory prerequisites msiexec.exe /qn /i "X:\WEBfactory 2010\WEBfactory\WEBfactory 2010.msi" REM Installs the WEBfactory 2010 software suite sqlcmd -S [Server]\[Instance Name] -U [User ID] -P [password] -Q "RESTORE DATABASE {Database Name] FROM DISK='D:\[Database Name].bak'" REM Restores the database regedit.exe /s [path to the .reg file] REM Activates the restored database in the registry. The .reg file with the DSN key is needed. xcopy "[Path to source project folder]" "C:\inetpub\wwwroot\_SERVICES\[Project Name]" /e /i REM Copies the project folder to the IIS C:\Windows\System32\inetsrv>appcmd add app /site.name:[Default Web Site] /path:/[Project Name] /physicalPath:[Physical path of the project] /applicationPool:[Application pool name] REM Converts the project folder into application with the correct Application Pool