Archive
Sitecore installation Framework (SIF) custom install path.
This is a very short post, and properly there exist different ways to achieve the same thing, but this is my take on installing Sitecore 9 in custom path.
As default when downloading the on prem package for Sitecore 9, the installation will install in “C:\inetpub\wwwroot”.
One way of installing all the different sites for a XP installation (cm/cd, XConnect, Identityserver) would be to change the “Site.PhysicalPath” in each *.json file for each role. But foreach installation you would make in the future you would have to edit all the files and change them accordingly.
So instead you could add a new parameter to *.ps1 file used to kick off the installation. But it near the top along side the other parameters needed by the installation framework
Next added it as parameter to the list for SIF parameters
No we have the parameters in place next we need to add updated “Site.PhysicalPath” in each *.json file but we only have to do this once. Changing the line
From
“Site.PhysicalPath”: “[joinpath(environment(‘SystemDrive’), ‘inetpub’, ‘wwwroot’, parameter(‘SiteName’))]”,
TO
“Site.PhysicalPath”: “[concat(parameter(‘InstallDir’), parameter(‘SiteName’))]”,
Last thing needed to do is to update the installation json fil. this would be the topology–env.json fx. XP0-SingleDeveloper.json with the parameter
For all future installation all we have to do is changing the $rootPath parameters in the *.ps1 file to install Sitecore in a custom location.