Including custom web part to web installer process

   —   
This article describes how to include custom web part to installer process so you can use the web part on every instance of Kentico CMS without importing it after the installation.
You may put the exported web part to Web Installer's folder (by default c:\program files\KenticoCMS\4.0\WebInstaller\Web\CMSSiteUtils\Import). Let's say its name would be webpart.zip. Now you need to modify c:\program files\KenticoCMS\4.0\WebInstaller\Web\CMSInstall\install.aspx.cs file, find line about 912 and add this code after it:

case 5:
...
SiteImportSettings set = new SiteImportSettings(new UserInfo());
set.SourceFilePath = HttpContext.Current.Server.MapPath("~/CMSSiteUtils/Import/webpart.zip");
set.WebsitePath = HttpContext.Current.Server.MapPath("~/");
ImportManager.Settings = set;
ImportManager.Import(new object());


See also:

Applies to: Kentico CMS 4.0
Share this article on   LinkedIn

Juraj Ondrus

Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.