Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Article printed from:

Revisiting install scripting for newer versions of Sitecore

Published 14 September 2015
Updated 25 August 2016

Previously, I've written a few posts (here, here and here) about automation approaches and PowerShell scripts I was experimenting with for installing developer instances of Sitecore 6. It seems about time that I checked out how that scripting work copes with newer versions of Sitecore...

In my original post, I investigated the parameters being passed to the Sitecore V6.6 MSI by the installer UI. I said at the time that it seemed likely these parameters might change as the versions of Sitecore changed and features evolved. Now that I'm spending some time working with newer releases, I've had a chance to compare how these parameters vary with newer versions. Using the same approach as previously, I've captured the command line being used to install the MSI for two of the newer release.

But it turns out that there are only minor changes in the settings between v6.6, v7.2 and v8.0. From what I've seen:

  • The `SITECORE_MVC` parameter appears to have been dropped for V7.2 and V8.0. Not surprising, as MVC is now integrated rather than being optional.
  • The default paths for the database files in `SC_DB_FOLDER`, `SC_MDF_FOLDER` and `SC_LDF_FOLDER` have changed from using the singular name "Database" to the plural "Databases" in V8.
  • The `SC_IISSITE_ID` parameter is no longer included. It seems likely the installer is now relying on the site name.

So it turns out that the approach for installing the newer versions can be pretty much the same as that used for the older ones. Extract the MSI file from the EXE, and use msiexec.exe with the appropriate parameters for your needs. To do so with a basic command line operation, you can use:

"Sitecore 8.0 rev. 150812.exe" /q /ExtractCab
"msiexec.exe" /qn /i "%cd%\SupportFiles\exe\Sitecore.msi" TRANSFORMS=":InstanceId5;:ComponentGUIDTransform5.mst" MSINEWINSTANCE=1 LOGVERBOSE=1 SC_LANG="en-US" SC_FULL="1" SC_INSTANCENAME="silent" SC_LICENSE_PATH="C:\Software\PartnerLicense-2015.xml" SC_SQL_SERVER_USER="sa" SC_SQL_SERVER="localhost" SC_SQL_SERVER_PASSWORD="p@55w0rd" SC_DBPREFIX="silent_" SC_PREFIX_PHYSICAL_FILES="1" SC_SQL_SERVER_CONFIG_USER="sa" SC_SQL_SERVER_CONFIG_PASSWORD="p@55w0rd" SC_DBTYPE="MSSQL" INSTALLLOCATION="C:\Inetpub\wwwroot\silent" SC_DATA_FOLDER="C:\Inetpub\wwwroot\silent\Data" SC_DB_FOLDER="C:\Inetpub\wwwroot\silent\Databases" SC_MDF_FOLDER="C:\Inetpub\wwwroot\silent\Databases\MDF" SC_LDF_FOLDER="C:\Inetpub\wwwroot\silent\Databases\LDF" SC_NET_VERSION="4"  SC_INTEGRATED_PIPELINE_MODE="1" SC_IISSITE_NAME="Silent" SC_IISAPPPOOL_NAME="SilentAppPool" SC_IISSITE_HEADER="silent" SC_IISSITE_PORT="80" /l*+v "%cd%\SilentInstall.log" 


Though as discussed previously, the TRANSFORMS parameter's InstanceId data is important to having the install work correctly, so the appropriate value needs to be worked out if you want to be able to install more than one instance of Sitecore on the same machine.

And so the same approach to using PowerShell scripts to automate this, along with other aspects of the install works too. Look back over my previous posts to see how that might work.

It's worth noting that with Sitecore 7.5 and newer you no longer need the script to add analytics to your installation, as this feature is always enabled. But conversely you need an instance of MongoDB for analytics data capture.

↑ Back to top