This commit is contained in:
alexY2004 2015-05-22 15:09:39 +03:00
commit a08adf9b91
54 changed files with 2971 additions and 1065 deletions

View file

@ -10,38 +10,38 @@
<Media Id="1" EmbedCab="yes" Cabinet="websitepanel_cab" /> <Media Id="1" EmbedCab="yes" Cabinet="websitepanel_cab" />
<!-- Use WIX_UPGRADE_DETECTED --> <!-- Use WIX_UPGRADE_DETECTED -->
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed."/> <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed."/>
<Feature Id ="WebsitePanel" Title="Website Panel" Level="1" ConfigurableDirectory="WEBSITEPANELDIR" AllowAdvertise="no" Display="expand" <Feature Id ="WebsitePanel" Title="Website Panel" Level="1" ConfigurableDirectory="WSP_INSTALL_DIR" AllowAdvertise="no" Display="expand"
Description="WebsitePanel is a complete portal for Cloud Computing Companies and IT Providers to automate the provisioning of a full suite of services on Windows servers."> Description="WebsitePanel is a complete portal for Cloud Computing Companies and IT Providers to automate the provisioning of a full suite of services on Windows servers.">
<ComponentGroupRef Id="WebsitePanelFiles" /> <ComponentGroupRef Id="WebsitePanelFiles" />
<Feature Id="ServerFeature" Title="$(var.ServerTitle)" Level="1" ConfigurableDirectory="INSTALLSERVERFOLDER" AllowAdvertise="no" <Feature Id="ServerFeature" Title="$(var.ServerTitle)" Level="1" ConfigurableDirectory="PI_SERVER_INSTALL_DIR" AllowAdvertise="no"
Description="$(var.ServerDescription)"> Description="$(var.ServerDescription)">
<ComponentGroupRef Id="ServerFiles" /> <ComponentGroupRef Id="ServerFiles" />
</Feature> </Feature>
<Feature Id="EnterpriseServerFeature" Title="$(var.EServerTitle)" Level="1" ConfigurableDirectory="INSTALLENTERPRISESERVERFOLDER" AllowAdvertise="no" <Feature Id="EnterpriseServerFeature" Title="$(var.EServerTitle)" Level="1" ConfigurableDirectory="PI_ESERVER_INSTALL_DIR" AllowAdvertise="no"
Description="$(var.ServerDescription)"> Description="$(var.ServerDescription)">
<ComponentGroupRef Id="EnterpriseServerFiles" /> <ComponentGroupRef Id="EnterpriseServerFiles" />
<ComponentGroupRef Id="DatabaseInstallation"/> <ComponentGroupRef Id="DatabaseInstallation"/>
</Feature> </Feature>
<Feature Id="PortalFeature" Title="$(var.PortalTitle)" Level="1" ConfigurableDirectory="INSTALLPORTALFOLDER" AllowAdvertise="no" <Feature Id="PortalFeature" Title="$(var.PortalTitle)" Level="1" ConfigurableDirectory="PI_PORTAL_INSTALL_DIR" AllowAdvertise="no"
Description="$(var.PortalDescription)"> Description="$(var.PortalDescription)">
<ComponentGroupRef Id="PortalFiles" /> <ComponentGroupRef Id="PortalFiles" />
</Feature> </Feature>
<Feature Id="SchedulerServiceFeature" Title="Scheduler Service" Level="1" ConfigurableDirectory="INSTALLSERVICEFOLDER" AllowAdvertise="no" Description="WebsitePanel Scheduler Service"> <Feature Id="SchedulerServiceFeature" Title="Scheduler Service" Level="1" ConfigurableDirectory="PI_SCHEDULER_INSTALL_DIR" AllowAdvertise="no" Description="WebsitePanel Scheduler Service">
<ComponentGroupRef Id="SchedulerServiceFiles" /> <ComponentGroupRef Id="SchedulerServiceFiles" />
</Feature> </Feature>
<Feature Id ="WDPortalFeature" Title="WebDAV Portal" Level="100" ConfigurableDirectory="INSTALLWEBDAVPORTALFOLDER" AllowAdvertise ="no" <Feature Id ="WDPortalFeature" Title="WebDAV Portal" Level="100" ConfigurableDirectory="PI_WDPORTAL_INSTALL_DIR" AllowAdvertise ="no"
Description="WebsitePanel WebDAV Portal"> Description="WebsitePanel WebDAV Portal">
<ComponentGroupRef Id="WebDavPortalFiles"/> <ComponentGroupRef Id="WebDavPortalFiles"/>
</Feature> </Feature>
</Feature> </Feature>
<!--Destinations.--> <!--Destinations.-->
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WEBSITEPANELDIR" Name="WebsitePanel"> <Directory Id="WSP_INSTALL_DIR" Name="WebsitePanel">
<Directory Id="INSTALLSERVICEFOLDER" Name="SchedulerService" /> <Directory Id="PI_SERVER_INSTALL_DIR" Name="Server" />
<Directory Id="INSTALLSERVERFOLDER" Name="Server" /> <Directory Id="PI_ESERVER_INSTALL_DIR" Name="Enterprise Server" />
<Directory Id="INSTALLENTERPRISESERVERFOLDER" Name="Enterprise Server" /> <Directory Id="PI_PORTAL_INSTALL_DIR" Name="Portal" />
<Directory Id="INSTALLPORTALFOLDER" Name="Portal" /> <Directory Id="PI_SCHEDULER_INSTALL_DIR" Name="SchedulerService" />
<Directory Id="INSTALLWEBDAVPORTALFOLDER" Name="WebDavPortal"/> <Directory Id="PI_WDPORTAL_INSTALL_DIR" Name="WebDavPortal"/>
</Directory> </Directory>
</Directory> </Directory>
<EnsureTable Id="ComboBox"/> <EnsureTable Id="ComboBox"/>
@ -565,11 +565,18 @@
<Property Id="COMPFOUND_PORTAL" Secure="yes" Value="0" /> <Property Id="COMPFOUND_PORTAL" Secure="yes" Value="0" />
<Property Id="COMPFOUND_WDPORTAL" Secure="yes" Value="1" /> <Property Id="COMPFOUND_WDPORTAL" Secure="yes" Value="1" />
<Property Id="COMPFOUND_SCHEDULER" Secure="yes" Value="1" /> <Property Id="COMPFOUND_SCHEDULER" Secure="yes" Value="1" />
<Property Id="COMPFOUND_SERVER_ID" Secure="yes" />
<Property Id="COMPFOUND_ESERVER_ID" Secure="yes" />
<Property Id="COMPFOUND_PORTAL_ID" Secure="yes" />
<Property Id="COMPFOUND_WDPORTAL_ID" Secure="yes" />
<Property Id="COMPFOUND_SCHEDULER_ID" Secure="yes" />
<Property Id="COMPFOUND_SERVER_MAIN_CFG" Secure="yes" />
<Property Id="COMPFOUND_ESERVER_MAIN_CFG" Secure="yes" />
<Property Id="COMPFOUND_PORTAL_MAIN_CFG" Secure="yes" />
<Property Id="COMPFOUND_WDPORTAL_MAIN_CFG" Secure="yes" />
<Property Id="COMPFOUND_SCHEDULER_MAIN_CFG" Secure="yes" />
<!--CustomActions.--> <!--CustomActions.-->
<!-- <CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' /> -->
<CustomAction Id="CA_CheckConnectionUI" BinaryKey="Assembly_CA" DllEntry="CheckConnectionUI" /> <CustomAction Id="CA_CheckConnectionUI" BinaryKey="Assembly_CA" DllEntry="CheckConnectionUI" />
<!-- <CustomAction Id='CA_PropertyFinalizeInstall' Property='CA_FinalizeInstall' Value='ConnectionString=[CONNECTIONSTRING];PreviousConnectionString=[PREVIOUSCONNECTIONSTRING];ServiceFolder=[SERVICEFOLDER];PreviousCryptoKey=[PREVIOUSCRYPTOKEY]' Return="check"/> -->
<CustomAction Id="CA_PropertyFinalizeInstall" Property="CA_FinalizeInstall" Value="" Return="check"/> <CustomAction Id="CA_PropertyFinalizeInstall" Property="CA_FinalizeInstall" Value="" Return="check"/>
<CustomAction Id="CA_FinalizeInstall" BinaryKey ="Assembly_CA" DllEntry="FinalizeInstall" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes"/> <CustomAction Id="CA_FinalizeInstall" BinaryKey ="Assembly_CA" DllEntry="FinalizeInstall" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes"/>
<CustomAction Id="CA_PreInstallationAction" BinaryKey="Assembly_CA" DllEntry="PreInstallationAction" /> <CustomAction Id="CA_PreInstallationAction" BinaryKey="Assembly_CA" DllEntry="PreInstallationAction" />
@ -595,38 +602,54 @@
<CustomAction Id="CA_SetEServerUrlUI" BinaryKey ="Assembly_CA" DllEntry="SetEServerUrlUI" /> <CustomAction Id="CA_SetEServerUrlUI" BinaryKey ="Assembly_CA" DllEntry="SetEServerUrlUI" />
<CustomAction Id="CA_InstallWebFeatures" BinaryKey="Assembly_CA" DllEntry="InstallWebFeatures" Impersonate="no" /> <CustomAction Id="CA_InstallWebFeatures" BinaryKey="Assembly_CA" DllEntry="InstallWebFeatures" Impersonate="no" />
<!--Run corresponding install scripts.--> <!--Run corresponding install scripts.-->
<!-- Prepare and backup when upgrading from old to new installer type.
Yes, session variables and custom action data are identical almost for corresponding WebsitePanel components in prepare and install scripts.
Prepare scripts must be run before normal installation process and file copying.-->
<CustomAction Id="CA_PropertyOnServerPrepare" Property="CA_OnServerPrepare" Value ="ApplicationName=$(var.NAME);ComponentName=$(var.ServerTitle);ComponentCode=server;ComponentDescription=$(var.ServerDescription);Version=$(var.VERSION);InstallationFolder=[PI_SERVER_INSTALL_DIR];InstallerFolder=[WSP_INSTALL_DIR];Installer=Microsoft Windows Installer;InstallerType=MSI;InstallerPath=[OriginalDatabase];IISVersion=[];SetupXml=[];WebSiteIP=[PI_SERVER_IP];WebSitePort=[PI_SERVER_PORT];WebSiteDomain=[PI_SERVER_HOST];UserDomain=[PI_SERVER_DOMAIN];UserAccount=[PI_SERVER_LOGIN];UserPassword=[PI_SERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE];ComponentId=[COMPFOUND_SERVER_ID];MainConfig=[COMPFOUND_SERVER_MAIN_CFG]" />
<CustomAction Id="CA_OnServerPrepare" BinaryKey="Assembly_CA" DllEntry="OnServerPrepare" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyOnEServerPrepare" Property="CA_OnEServerPrepare" Value ="ApplicationName=$(var.NAME);ComponentName=$(var.EServerTitle);ComponentCode=enterprise server;ComponentDescription=$(var.EServerDescription);Version=$(var.VERSION);InstallationFolder=[PI_ESERVER_INSTALL_DIR];InstallerFolder=[WSP_INSTALL_DIR];Installer=Microsoft Windows Installer;InstallerType=MSI;InstallerPath=[OriginalDatabase];IISVersion=[];SetupXml=[];WebSiteIP=[PI_ESERVER_IP];WebSitePort=[PI_ESERVER_PORT];WebSiteDomain=[PI_ESERVER_HOST];UserDomain=[PI_ESERVER_DOMAIN];UserAccount=[PI_ESERVER_LOGIN];UserPassword=[PI_ESERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE];ComponentId=[COMPFOUND_ESERVER_ID];MainConfig=[COMPFOUND_ESERVER_MAIN_CFG]" />
<CustomAction Id="CA_OnEServerPrepare" BinaryKey="Assembly_CA" DllEntry="OnEServerPrepare" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyOnPortalPrepare" Property="CA_OnPortalPrepare" Value ="ApplicationName=$(var.NAME);ComponentName=$(var.PortalTitle);ComponentCode=portal;ComponentDescription=$(var.PortalDescription);Version=$(var.VERSION);InstallationFolder=[PI_PORTAL_INSTALL_DIR];InstallerFolder=[WSP_INSTALL_DIR];Installer=Microsoft Windows Installer;InstallerType=MSI;InstallerPath=[OriginalDatabase];IISVersion=[];SetupXml=[];WebSiteIP=[PI_PORTAL_IP];WebSitePort=[PI_PORTAL_PORT];WebSiteDomain=[PI_PORTAL_HOST];UserDomain=[PI_PORTAL_DOMAIN];UserAccount=[PI_PORTAL_LOGIN];UserPassword=[PI_PORTAL_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE];ComponentId=[COMPFOUND_PORTAL_ID];MainConfig=[COMPFOUND_PORTAL_MAIN_CFG]" />
<CustomAction Id="CA_OnPortalPrepare" BinaryKey="Assembly_CA" DllEntry="OnPortalPrepare" Impersonate="no" Execute="deferred" HideTarget="no" />
<!--Install scripts.-->
<!--Server.--> <!--Server.-->
<CustomAction Id="CA_PropertyOnServerInstall" Property="CA_OnServerInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.ServerTitle);ComponentCode=server;ComponentDescription=$(var.ServerDescription);Version=$(var.VERSION);InstallationFolder=[INSTALLSERVERFOLDER];InstallerFolder=[WEBSITEPANELDIR];Installer=[];InstallerType=[];InstallerPath=[];IISVersion=[];SetupXml=[];WebSiteIP=[PI_SERVER_IP];WebSitePort=[PI_SERVER_PORT];WebSiteDomain=[PI_SERVER_HOST];UserDomain=[PI_SERVER_DOMAIN];UserAccount=[PI_SERVER_LOGIN];UserPassword=[PI_SERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" /> <CustomAction Id="CA_PropertyOnServerInstall" Property="CA_OnServerInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.ServerTitle);ComponentCode=server;ComponentDescription=$(var.ServerDescription);Version=$(var.VERSION);InstallationFolder=[PI_SERVER_INSTALL_DIR];InstallerFolder=[WSP_INSTALL_DIR];Installer=Microsoft Windows Installer;InstallerType=MSI;InstallerPath=[OriginalDatabase];IISVersion=[];SetupXml=[];WebSiteIP=[PI_SERVER_IP];WebSitePort=[PI_SERVER_PORT];WebSiteDomain=[PI_SERVER_HOST];UserDomain=[PI_SERVER_DOMAIN];UserAccount=[PI_SERVER_LOGIN];UserPassword=[PI_SERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE];ComponentId=[COMPFOUND_SERVER_ID]" />
<CustomAction Id="CA_OnServerInstall" BinaryKey ="Assembly_CA" DllEntry="OnServerInstall" Impersonate="no" Execute="deferred" HideTarget="no"/> <CustomAction Id="CA_OnServerInstall" BinaryKey ="Assembly_CA" DllEntry="OnServerInstall" Impersonate="no" Execute="deferred" HideTarget="no"/>
<!--EServer.--> <!--EServer.-->
<CustomAction Id="CA_PropertyOnEServerInstall" Property="CA_OnEServerInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.EServerTitle);ComponentCode=enterprise server;ComponentDescription=$(var.EServerDescription);Version=$(var.VERSION);InstallationFolder=[INSTALLENTERPRISESERVERFOLDER];InstallerFolder=[WEBSITEPANELDIR];Installer=[];InstallerType=[];InstallerPath=[];IISVersion=[];SetupXml=[];WebSiteIP=[PI_ESERVER_IP];WebSitePort=[PI_ESERVER_PORT];WebSiteDomain=[PI_ESERVER_HOST];UserDomain=[PI_ESERVER_DOMAIN];UserAccount=[PI_ESERVER_LOGIN];UserPassword=[PI_ESERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" /> <CustomAction Id="CA_PropertyOnEServerInstall" Property="CA_OnEServerInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.EServerTitle);ComponentCode=enterprise server;ComponentDescription=$(var.EServerDescription);Version=$(var.VERSION);InstallationFolder=[PI_ESERVER_INSTALL_DIR];InstallerFolder=[WSP_INSTALL_DIR];Installer=Microsoft Windows Installer;InstallerType=MSI;InstallerPath=[OriginalDatabase];IISVersion=[];SetupXml=[];WebSiteIP=[PI_ESERVER_IP];WebSitePort=[PI_ESERVER_PORT];WebSiteDomain=[PI_ESERVER_HOST];UserDomain=[PI_ESERVER_DOMAIN];UserAccount=[PI_ESERVER_LOGIN];UserPassword=[PI_ESERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE];ComponentId=[COMPFOUND_ESERVER_ID]" />
<CustomAction Id="CA_OnEServerInstall" BinaryKey ="Assembly_CA" DllEntry="OnEServerInstall" Impersonate="no" Execute="deferred" HideTarget="no"/> <CustomAction Id="CA_OnEServerInstall" BinaryKey ="Assembly_CA" DllEntry="OnEServerInstall" Impersonate="no" Execute="deferred" HideTarget="no"/>
<!--Portal.--> <!--Portal.-->
<CustomAction Id="CA_PropertyOnPortalInstall" Property="CA_OnPortalInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.PortalTitle);ComponentCode=portal;ComponentDescription=$(var.PortalDescription);Version=$(var.VERSION);InstallationFolder=[INSTALLPORTALFOLDER];InstallerFolder=[WEBSITEPANELDIR];Installer=[];InstallerType=[];InstallerPath=[];IISVersion=[];SetupXml=[];WebSiteIP=[PI_PORTAL_IP];WebSitePort=[PI_PORTAL_PORT];WebSiteDomain=[PI_PORTAL_HOST];UserDomain=[PI_PORTAL_DOMAIN];UserAccount=[PI_PORTAL_LOGIN];UserPassword=[PI_PORTAL_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" /> <CustomAction Id="CA_PropertyOnPortalInstall" Property="CA_OnPortalInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.PortalTitle);ComponentCode=portal;ComponentDescription=$(var.PortalDescription);Version=$(var.VERSION);InstallationFolder=[PI_PORTAL_INSTALL_DIR];InstallerFolder=[WSP_INSTALL_DIR];Installer=Microsoft Windows Installer;InstallerType=MSI;InstallerPath=[OriginalDatabase];IISVersion=[];SetupXml=[];WebSiteIP=[PI_PORTAL_IP];WebSitePort=[PI_PORTAL_PORT];WebSiteDomain=[PI_PORTAL_HOST];UserDomain=[PI_PORTAL_DOMAIN];UserAccount=[PI_PORTAL_LOGIN];UserPassword=[PI_PORTAL_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE];ComponentId=[COMPFOUND_PORTAL_ID]" />
<CustomAction Id="CA_OnPortalInstall" BinaryKey ="Assembly_CA" DllEntry="OnPortalInstall" Impersonate="no" Execute="deferred" HideTarget="no"/> <CustomAction Id="CA_OnPortalInstall" BinaryKey ="Assembly_CA" DllEntry="OnPortalInstall" Impersonate="no" Execute="deferred" HideTarget="no"/>
<!--Run corresponding uninstall scripts.--> <!--Run corresponding uninstall scripts.-->
<CustomAction Id="CA_PropertyOnServerRemove" Property="CA_OnServerRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=server;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" /> <CustomAction Id="CA_PropertyOnServerRemove" Property="CA_OnServerRemove" Value="InstallerFolder=[WSP_INSTALL_DIR];ComponentCode=server;BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnServerRemove" BinaryKey="Assembly_CA" DllEntry="OnServerRemove" Impersonate="no" Execute="deferred" HideTarget="no" /> <CustomAction Id="CA_OnServerRemove" BinaryKey="Assembly_CA" DllEntry="OnServerRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyOnEServerRemove" Property="CA_OnEServerRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=enterprise server;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" /> <CustomAction Id="CA_PropertyOnEServerRemove" Property="CA_OnEServerRemove" Value="InstallerFolder=[WSP_INSTALL_DIR];ComponentCode=enterprise server;BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnEServerRemove" BinaryKey="Assembly_CA" DllEntry="OnEServerRemove" Impersonate="no" Execute="deferred" HideTarget="no" /> <CustomAction Id="CA_OnEServerRemove" BinaryKey="Assembly_CA" DllEntry="OnEServerRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyOnPortalRemove" Property="CA_OnPortalRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=portal;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" /> <CustomAction Id="CA_PropertyOnPortalRemove" Property="CA_OnPortalRemove" Value="InstallerFolder=[WSP_INSTALL_DIR];ComponentCode=portal;BaseDirectory=[WSP_INSTALL_DIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnPortalRemove" BinaryKey="Assembly_CA" DllEntry="OnPortalRemove" Impersonate="no" Execute="deferred" HideTarget="no" /> <CustomAction Id="CA_OnPortalRemove" BinaryKey="Assembly_CA" DllEntry="OnPortalRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
<!--Maintenance mode.--> <!--Maintenance mode.-->
<CustomAction Id="CA_PropertyMaintenanceServer" Property="CA_MaintenanceServer" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=server;BaseDirectory=[WEBSITEPANELDIR];ServerPassword=[SERVER_ACCESS_PASSWORD]" /> <CustomAction Id="CA_PropertyMaintenanceServer" Property="CA_MaintenanceServer" Value="InstallerFolder=[WSP_INSTALL_DIR];ComponentCode=server;BaseDirectory=[WSP_INSTALL_DIR];ServerPassword=[SERVER_ACCESS_PASSWORD]" />
<CustomAction Id="CA_MaintenanceServer" BinaryKey="Assembly_CA" DllEntry="MaintenanceServer" Impersonate="no" Execute="deferred" HideTarget="no" /> <CustomAction Id="CA_MaintenanceServer" BinaryKey="Assembly_CA" DllEntry="MaintenanceServer" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyMaintenanceEServer" Property="CA_MaintenanceEServer" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=enterprise server;BaseDirectory=[WEBSITEPANELDIR];ServerAdminPassword=[SERVERADMIN_PASSWORD];" /> <CustomAction Id="CA_PropertyMaintenanceEServer" Property="CA_MaintenanceEServer" Value="InstallerFolder=[WSP_INSTALL_DIR];ComponentCode=enterprise server;BaseDirectory=[WSP_INSTALL_DIR];ServerAdminPassword=[SERVERADMIN_PASSWORD];" />
<CustomAction Id="CA_MaintenanceEServer" BinaryKey="Assembly_CA" DllEntry="MaintenanceEServer" Impersonate="no" Execute="deferred" HideTarget="no" /> <CustomAction Id="CA_MaintenanceEServer" BinaryKey="Assembly_CA" DllEntry="MaintenanceEServer" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyMaintenancePortal" Property="CA_MaintenancePortal" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=portal;BaseDirectory=[WEBSITEPANELDIR];EnterpriseServerUrl=[PI_ESERVER_URL]" /> <CustomAction Id="CA_PropertyMaintenancePortal" Property="CA_MaintenancePortal" Value="InstallerFolder=[WSP_INSTALL_DIR];ComponentCode=portal;BaseDirectory=[WSP_INSTALL_DIR];EnterpriseServerUrl=[PI_ESERVER_URL]" />
<CustomAction Id="CA_MaintenancePortal" BinaryKey="Assembly_CA" DllEntry="MaintenancePortal" Impersonate="no" Execute="deferred" HideTarget="no" /> <CustomAction Id="CA_MaintenancePortal" BinaryKey="Assembly_CA" DllEntry="MaintenancePortal" Impersonate="no" Execute="deferred" HideTarget="no" />
<!----> <!---->
<SetProperty Id="WEBSITEPANELDIR" After="AppSearch" Value="[WSP_BASE]">WSP_BASE</SetProperty> <SetProperty Id="WSP_INSTALL_DIR" After="AppSearch" Value="[WSP_BASE]">WSP_BASE</SetProperty>
<SetProperty Id="ARPINSTALLLOCATION" Value="[WSP_INSTALL_DIR]" After="InstallValidate" Sequence="execute" />
<CustomAction Id="CA_PreFillSettings" BinaryKey="Assembly_CA" DllEntry="PreFillSettings" /> <CustomAction Id="CA_PreFillSettings" BinaryKey="Assembly_CA" DllEntry="PreFillSettings" />
<!--Exe sequence.--> <!--Exe sequence.-->
<InstallExecuteSequence> <InstallExecuteSequence>
<!--Preinstall.-->
<Custom Action="CA_InstallWebFeatures" Before="CostInitialize"><![CDATA[(&ServerFeature=3) OR (&EnterpriseServerFeature=3) OR (&PortalFeature=3) OR (&SchedulerServiceFeature=3) OR (&WDPortalFeature=3)]]></Custom> <Custom Action="CA_InstallWebFeatures" Before="CostInitialize"><![CDATA[(&ServerFeature=3) OR (&EnterpriseServerFeature=3) OR (&PortalFeature=3) OR (&SchedulerServiceFeature=3) OR (&WDPortalFeature=3)]]></Custom>
<!--<Custom Action="CA_PropertyFinalizeInstall" After='InstallValidate'/> <!--Preparation when "old to new installer update".-->
<Custom Action="CA_FinalizeUnInstall" After="InstallValidate">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom> <Custom Action="CA_PropertyOnServerPrepare" Before="InstallFiles"><![CDATA[COMPFOUND_SERVER=1 AND NOT WIX_UPGRADE_DETECTED AND NOT UPGRADINGPRODUCTCODE]]></Custom>
<Custom Action="CA_FinalizeInstall" After="InstallFiles" >NOT Installed or REINSTALL</Custom>--> <Custom Action="CA_OnServerPrepare" After="CA_PropertyOnServerPrepare"><![CDATA[COMPFOUND_SERVER=1 AND NOT WIX_UPGRADE_DETECTED AND NOT UPGRADINGPRODUCTCODE]]></Custom>
<Custom Action="CA_PropertyOnEServerPrepare" Before="InstallFiles"><![CDATA[COMPFOUND_ESERVER=1 AND NOT WIX_UPGRADE_DETECTED AND NOT UPGRADINGPRODUCTCODE]]></Custom>
<Custom Action="CA_OnEServerPrepare" After="CA_PropertyOnEServerPrepare"><![CDATA[COMPFOUND_ESERVER=1 AND NOT WIX_UPGRADE_DETECTED AND NOT UPGRADINGPRODUCTCODE]]></Custom>
<Custom Action="CA_PropertyOnPortalPrepare" Before="InstallFiles"><![CDATA[COMPFOUND_PORTAL=1 AND NOT WIX_UPGRADE_DETECTED AND NOT UPGRADINGPRODUCTCODE]]></Custom>
<Custom Action="CA_OnPortalPrepare" After="CA_PropertyOnPortalPrepare"><![CDATA[COMPFOUND_PORTAL=1 AND NOT WIX_UPGRADE_DETECTED AND NOT UPGRADINGPRODUCTCODE]]></Custom>
<!--First Install. [Installed] property not used here because we distinguish per feature basis.--> <!--First Install. [Installed] property not used here because we distinguish per feature basis.-->
<Custom Action="CA_PropertyOnServerInstall" After="InstallValidate"><![CDATA[(&ServerFeature=3) AND NOT(!ServerFeature=3)]]></Custom> <Custom Action="CA_PropertyOnServerInstall" After="InstallValidate"><![CDATA[(&ServerFeature=3) AND NOT(!ServerFeature=3)]]></Custom>
<Custom Action="CA_OnServerInstall" After="InstallFiles"><![CDATA[(&ServerFeature=3) AND NOT(!ServerFeature=3)]]></Custom> <Custom Action="CA_OnServerInstall" After="InstallFiles"><![CDATA[(&ServerFeature=3) AND NOT(!ServerFeature=3)]]></Custom>
@ -649,7 +672,7 @@
<Custom Action="CA_PropertyMaintenancePortal" After="InstallInitialize"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Custom> <Custom Action="CA_PropertyMaintenancePortal" After="InstallInitialize"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Custom>
<Custom Action="CA_MaintenancePortal" After="CA_PropertyMaintenancePortal"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Custom> <Custom Action="CA_MaintenancePortal" After="CA_PropertyMaintenancePortal"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Custom>
<!----> <!---->
<!--<Custom Action="CA_PreFillSettings" After="SetWEBSITEPANELDIR">1</Custom>--> <!--<Custom Action="CA_PreFillSettings" After="SetWSP_INSTALL_DIR">1</Custom>-->
</InstallExecuteSequence> </InstallExecuteSequence>
<InstallUISequence> <InstallUISequence>
<Custom Action="CA_PreFillSettings" Before="CA_InstallWebFeatures" /> <Custom Action="CA_PreFillSettings" Before="CA_InstallWebFeatures" />
@ -668,10 +691,10 @@
<ComponentRef Id="UpdateDatabaseSql"/> <ComponentRef Id="UpdateDatabaseSql"/>
<ComponentRef Id="UpdateDatabaseWin"/> <ComponentRef Id="UpdateDatabaseWin"/>
</ComponentGroup> </ComponentGroup>
<DirectoryRef Id="INSTALLENTERPRISESERVERFOLDER"> <DirectoryRef Id="PI_ESERVER_INSTALL_DIR">
<Component Id="InstallDatabaseSql" Guid="{81FB6008-A445-464F-8A0E-2EE076027FF3}"> <Component Id="InstallDatabaseSql" Guid="{81FB6008-A445-464F-8A0E-2EE076027FF3}">
<CreateFolder /> <CreateFolder />
<Condition>(NOT Installed AND NOT WIX_UPGRADE_DETECTED) AND NOT(DB_AUTH = "Windows Authentication")</Condition> <Condition>(NOT Installed AND NOT WIX_UPGRADE_DETECTED) AND NOT(DB_AUTH = "Windows Authentication") AND (COMPFOUND_ESERVER="0")</Condition>
<util:User Id="SqlUser" Name="[DB_LOGIN]" Password="[DB_PASSWORD]" CreateUser="no" /> <util:User Id="SqlUser" Name="[DB_LOGIN]" Password="[DB_PASSWORD]" CreateUser="no" />
<sql:SqlDatabase Id="SqlDatabaseInstallSql" ConfirmOverwrite="yes" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="no" CreateOnUninstall="no" <sql:SqlDatabase Id="SqlDatabaseInstallSql" ConfirmOverwrite="yes" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="no" CreateOnUninstall="no"
DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no" DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no"
@ -684,18 +707,24 @@
<Component Id="UpdateDatabaseSql" Guid="{089C02F9-D598-435E-8DA9-FC8AED00495C}"> <Component Id="UpdateDatabaseSql" Guid="{089C02F9-D598-435E-8DA9-FC8AED00495C}">
<Condition>NOT (Remove="ALL") AND NOT(DB_AUTH = "Windows Authentication")</Condition> <Condition>NOT (Remove="ALL") AND NOT(DB_AUTH = "Windows Authentication")</Condition>
<CreateFolder /> <CreateFolder />
<sql:SqlString Id="SqlVersionUpdateSql" SQL="IF NOT EXISTS (SELECT * FROM dbo.Versions WHERE DatabaseVersion = '$(var.sql_release_version)') <util:User Id="SqlUpdateUser" Name="[DB_LOGIN]" Password="[DB_PASSWORD]" CreateUser="no" />
BEGIN <sql:SqlDatabase Id="SqlDatabaseUpdateSql" ConfirmOverwrite="yes" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="yes" CreateOnUninstall="no"
INSERT dbo.Versions (DatabaseVersion, BuildDate) VALUES ('$(var.sql_release_version)', '$(var.sql_build_date)') DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no"
END" Server="[DB_SERVER]"
SqlDb="SqlDatabaseInstallWin" Sequence="2" User="SqlUser" Database="[DB_DATABASE]"
ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no"/> User="SqlUpdateUser">
<sql:SqlScript Id="SqlUpdateScriptSql" BinaryKey="UpdateDB" SqlDb="SqlDatabaseInstallSql" Sequence="3" User="SqlUser" <sql:SqlString Id="SqlVersionUpdateSql" SQL="IF NOT EXISTS (SELECT * FROM dbo.Versions WHERE DatabaseVersion = '$(var.sql_release_version)')
ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no"/> BEGIN
</Component> INSERT dbo.Versions (DatabaseVersion, BuildDate) VALUES ('$(var.sql_release_version)', '$(var.sql_build_date)')
END"
Sequence="2" ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no"/>
<sql:SqlScript Id="SqlUpdateScriptSql" BinaryKey="UpdateDB" Sequence="3"
ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no"/>
</sql:SqlDatabase>
</Component>
<Component Id="InstallDatabaseWin" Guid="{C50FC58C-3EF3-452D-BA9B-C9513B4D941A}"> <Component Id="InstallDatabaseWin" Guid="{C50FC58C-3EF3-452D-BA9B-C9513B4D941A}">
<CreateFolder /> <CreateFolder />
<Condition>(NOT Installed AND NOT WIX_UPGRADE_DETECTED) AND (DB_AUTH = "Windows Authentication")</Condition> <Condition>(NOT Installed AND NOT WIX_UPGRADE_DETECTED) AND (DB_AUTH = "Windows Authentication") AND (COMPFOUND_ESERVER="0")</Condition>
<sql:SqlDatabase Id="SqlDatabaseInstallWin" ConfirmOverwrite="yes" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="no" CreateOnUninstall="no" <sql:SqlDatabase Id="SqlDatabaseInstallWin" ConfirmOverwrite="yes" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="no" CreateOnUninstall="no"
DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no" DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no"
Server="[DB_SERVER]" Server="[DB_SERVER]"
@ -706,24 +735,29 @@
<Component Id="UpdateDatabaseWin" Guid="{A2770B5C-DA46-4125-950F-73A640EB312B}"> <Component Id="UpdateDatabaseWin" Guid="{A2770B5C-DA46-4125-950F-73A640EB312B}">
<Condition>NOT (Remove="ALL") AND (DB_AUTH = "Windows Authentication")</Condition> <Condition>NOT (Remove="ALL") AND (DB_AUTH = "Windows Authentication")</Condition>
<CreateFolder /> <CreateFolder />
<sql:SqlString Id="SqlVersionUpdateWin" SQL="IF NOT EXISTS (SELECT * FROM dbo.Versions WHERE DatabaseVersion = '$(var.sql_release_version)') <sql:SqlDatabase Id="SqlDatabaseUpdateWin" ConfirmOverwrite="no" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="yes" CreateOnUninstall="no"
DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no"
Server="[DB_SERVER]"
Database="[DB_DATABASE]">
<sql:SqlString Id="SqlVersionUpdateWin" SQL="IF NOT EXISTS (SELECT * FROM dbo.Versions WHERE DatabaseVersion = '$(var.sql_release_version)')
BEGIN BEGIN
INSERT dbo.Versions (DatabaseVersion, BuildDate) VALUES ('$(var.sql_release_version)', '$(var.sql_build_date)') INSERT dbo.Versions (DatabaseVersion, BuildDate) VALUES ('$(var.sql_release_version)', '$(var.sql_build_date)')
END" END"
SqlDb="SqlDatabaseInstallWin" Sequence="11" ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no"/> Sequence="11" ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no"/>
<sql:SqlScript Id="SqlUpdateScriptWin" BinaryKey="UpdateDB" SqlDb="SqlDatabaseInstallWin" Sequence="12" <sql:SqlScript Id="SqlUpdateScriptWin" BinaryKey="UpdateDB" Sequence="12"
ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no" /> ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no" />
</sql:SqlDatabase>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
</Fragment> </Fragment>
<Fragment> <Fragment>
<ComponentGroup Id="WebsitePanelFiles"> <ComponentGroup Id="WebsitePanelFiles">
<Component Id ="comp_WebsitePanel_config" Directory="WEBSITEPANELDIR" Guid="{28CD1ADB-562C-4E38-A3B6-325D3A2718B1}"> <Component Id ="comp_WebsitePanel_config" Directory="WSP_INSTALL_DIR" Guid="{28CD1ADB-562C-4E38-A3B6-325D3A2718B1}">
<File Id="file_WebsitePanel_config" KeyPath="yes" Source="WebsitePanel.config" /> <File Id="file_WebsitePanel_config" KeyPath="yes" Source="WebsitePanel.config" />
</Component> </Component>
<Component Id="comp_WebsitePanel_reg_locator" Directory="WEBSITEPANELDIR" Guid="{CC35E1B5-3E29-4AD1-991C-2904E4DCB099}"> <Component Id="comp_WebsitePanel_reg_locator" Directory="WSP_INSTALL_DIR" Guid="{CC35E1B5-3E29-4AD1-991C-2904E4DCB099}">
<RegistryValue Root='HKLM' Key='SOFTWARE\[ProductName]' <RegistryValue Root='HKLM' Key='SOFTWARE\[ProductName]'
Name='Base' Value='[WEBSITEPANELDIR]' Name='Base' Value='[WSP_INSTALL_DIR]'
Type='string' /> Type='string' />
</Component> </Component>
</ComponentGroup> </ComponentGroup>

View file

@ -5,7 +5,7 @@
<?define SERVERBUILDPATH = "$(var.PROJECTPATH)\Build\$(var.BUILD)\Server\bin"?> <?define SERVERBUILDPATH = "$(var.PROJECTPATH)\Build\$(var.BUILD)\Server\bin"?>
<Fragment> <Fragment>
<ComponentGroup Id="SchedulerServiceFiles"> <ComponentGroup Id="SchedulerServiceFiles">
<Component Id="cmpSchedulerServiceFiles" Directory="INSTALLSERVICEFOLDER" Guid="{5E9F9A14-DB8E-4555-8D40-67110698F046}"> <Component Id="cmpSchedulerServiceFiles" Directory="PI_SCHEDULER_INSTALL_DIR" Guid="{5E9F9A14-DB8E-4555-8D40-67110698F046}">
<File Id="WebsitePanel.SchedulerService.exe" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe" /> <File Id="WebsitePanel.SchedulerService.exe" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe" />
<File Id="WebsitePanel.SchedulerService.exe.config" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe.config" /> <File Id="WebsitePanel.SchedulerService.exe.config" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe.config" />
<File Id="Ionic.Zip.Reduced.dll" Source="$(var.SERVERBUILDPATH)\Ionic.Zip.Reduced.dll"/> <File Id="Ionic.Zip.Reduced.dll" Source="$(var.SERVERBUILDPATH)\Ionic.Zip.Reduced.dll"/>

View file

@ -232,7 +232,7 @@ namespace WebsitePanel.Setup.Actions
{ {
void IInstallAction.Run(SetupVariables vars) void IInstallAction.Run(SetupVariables vars)
{ {
try try
{ {
// //
Log.WriteStart(String.Format("Creating database user {0}", vars.Database)); Log.WriteStart(String.Format("Creating database user {0}", vars.Database));

View file

@ -394,7 +394,7 @@ namespace WebsitePanel.Setup.Actions
} }
// This flag is the opposite of poolExists flag // This flag is the opposite of poolExists flag
vars.NewWebApplicationPool = !poolExists; vars.NewWebApplicationPool = !poolExists || vars.ComponentExists;
if (poolExists) if (poolExists)
{ {
@ -501,7 +501,7 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars) void IInstallAction.Run(SetupVariables vars)
{ {
var siteName = vars.ComponentFullName; var siteName = vars.ComponentFullName;
var ip = vars.WebSiteIP; var ip = vars.WebSiteIP;
var port = vars.WebSitePort; var port = vars.WebSitePort;
var domain = vars.WebSiteDomain; var domain = vars.WebSiteDomain;
@ -774,7 +774,7 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars) void IInstallAction.Run(SetupVariables vars)
{ {
try try
{ {
Begin(LogStartInstallMessage); Begin(LogStartInstallMessage);
// //

View file

@ -335,10 +335,10 @@ namespace WebsitePanel.Setup
return files; return files;
} }
public static void CopyFileToFolder(string sourceFile, string destinationFolder) public static void CopyFileToFolder(string sourceFile, string destinationFolder, string destinationFileName = "")
{ {
string fileName = Path.GetFileName(sourceFile); string fileName = Path.GetFileName(sourceFile);
string destinationFile = Path.Combine(destinationFolder, fileName); string destinationFile = Path.Combine(destinationFolder, string.IsNullOrWhiteSpace(destinationFileName) ? fileName : destinationFileName);
CopyFile(new FileInfo(sourceFile), destinationFile); CopyFile(new FileInfo(sourceFile), destinationFile);
} }

View file

@ -89,7 +89,8 @@ namespace WebsitePanel.Setup
SwitchEntServer2AspNet40, SwitchEntServer2AspNet40,
SwitchWebPortal2AspNet40, SwitchWebPortal2AspNet40,
ConfigureSecureSessionModuleInWebConfig, ConfigureSecureSessionModuleInWebConfig,
RestoreConfig RestoreConfig,
UpdateXml
} }
public class InstallAction public class InstallAction

View file

@ -398,7 +398,7 @@ namespace WebsitePanel.Setup
/// <summary> /// <summary>
/// Check for existing user /// Check for existing user
/// </summary> /// </summary>
internal static bool UserExists(string domain, string userName) public static bool UserExists(string domain, string userName)
{ {
bool found = false; bool found = false;
// check whether user account already exists // check whether user account already exists

View file

@ -249,6 +249,12 @@ namespace WebsitePanel.Setup
public string BaseDirectory { get; set; } public string BaseDirectory { get; set; }
public string SpecialBaseDirectory { get; set; }
public IDictionary<string, string> FileNameMap { get; set; }
public IDictionary<string, string> SessionVariables { get; set; }
public IDictionary<string, string[]> XmlData { get; set; } // XPath, Value.
public bool ComponentExists { get; set; }
public string UpdateVersion { get; set; } public string UpdateVersion { get; set; }
public string EnterpriseServerURL { get; set; } public string EnterpriseServerURL { get; set; }
@ -278,7 +284,8 @@ namespace WebsitePanel.Setup
public string ServiceName { get; set; } public string ServiceName { get; set; }
public string ConfigurationFile { get; set; } public string ConfigurationFile { get; set; }
private bool m_UseUserCredentials = true;
public bool UseUserCredentials { get { return m_UseUserCredentials; } set { m_UseUserCredentials = value; } }
public string ServiceFile { get; set; } public string ServiceFile { get; set; }
public string LicenseKey { get; set; } public string LicenseKey { get; set; }

View file

@ -768,7 +768,7 @@ namespace WebsitePanel.Setup
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <returns></returns> /// <returns></returns>
internal static bool ApplicationPoolExists(string name) public static bool ApplicationPoolExists(string name)
{ {
WmiHelper wmi = new WmiHelper("root\\MicrosoftIISv2"); WmiHelper wmi = new WmiHelper("root\\MicrosoftIISv2");
return(wmi.ExecuteQuery( return(wmi.ExecuteQuery(
@ -780,7 +780,7 @@ namespace WebsitePanel.Setup
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <returns></returns> /// <returns></returns>
internal static bool IIS7ApplicationPoolExists(string name) public static bool IIS7ApplicationPoolExists(string name)
{ {
ServerManager serverManager = new ServerManager(); ServerManager serverManager = new ServerManager();
bool ret = (serverManager.ApplicationPools[name] != null); bool ret = (serverManager.ApplicationPools[name] != null);

View file

@ -7,8 +7,10 @@ using System.Configuration.Install;
using System.Data; using System.Data;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.ServiceProcess;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Xml; using System.Xml;
@ -163,6 +165,11 @@ namespace WebsitePanel.Setup.Internal
Utils.GetStringSetupParameter(Hash, Global.Parameters.DbServerAdminPassword)); Utils.GetStringSetupParameter(Hash, Global.Parameters.DbServerAdminPassword));
Dst.BaseDirectory = Utils.GetStringSetupParameter(Hash, Global.Parameters.BaseDirectory); Dst.BaseDirectory = Utils.GetStringSetupParameter(Hash, Global.Parameters.BaseDirectory);
Dst.ComponentId = Utils.GetStringSetupParameter(Hash, Global.Parameters.ComponentId);
Dst.ComponentExists = string.IsNullOrWhiteSpace(Dst.ComponentId) ? false : true;
Dst.UpdateVersion = Utils.GetStringSetupParameter(Hash, "Version");
Dst.SessionVariables = Src;
} }
public static string GetFullConfigPath(SetupVariables Ctx) public static string GetFullConfigPath(SetupVariables Ctx)
{ {
@ -196,7 +203,7 @@ namespace WebsitePanel.Setup.Internal
var mup = "MODE_UP"; var mup = "MODE_UP";
var mrup = "MODE_RUP"; var mrup = "MODE_RUP";
var Result = ModeExtension.Normal; var Result = ModeExtension.Normal;
if (Src.Keys.Contains(mup) && !string.IsNullOrWhiteSpace(Src[mup])) if ((Src.Keys.Contains(mup) && !string.IsNullOrWhiteSpace(Src[mup])) || (Src.Keys.Contains("ComponentId") && !string.IsNullOrWhiteSpace(Src["ComponentId"])))
Result = ModeExtension.Restore; Result = ModeExtension.Restore;
else if (Src.Keys.Contains(mrup) && !string.IsNullOrWhiteSpace(Src[mrup])) else if (Src.Keys.Contains(mrup) && !string.IsNullOrWhiteSpace(Src[mrup]))
Result = ModeExtension.Backup; Result = ModeExtension.Backup;
@ -404,6 +411,9 @@ namespace WebsitePanel.Setup.Internal
case ActionTypes.RestoreConfig: case ActionTypes.RestoreConfig:
RestoreXmlConfigs(Execute.SetupVariables); RestoreXmlConfigs(Execute.SetupVariables);
break; break;
case ActionTypes.UpdateXml:
UpdateXml(Execute.Path, Execute.SetupVariables.XmlData);
break;
} }
} }
catch (Exception ex) catch (Exception ex)
@ -2165,39 +2175,54 @@ namespace WebsitePanel.Setup.Internal
try try
{ {
string componentId = Context.ComponentId; string componentId = Context.ComponentId;
string path = Path.Combine(Context.InstallationFolder, Context.ServiceFile); string path = Context.ServiceFile; // FullFileName.
string service = Context.ServiceName; string service = Context.ServiceName;
Log.WriteStart(string.Format("Registering \"{0}\" windows service", service));
if (!File.Exists(path)) if (!File.Exists(path))
{ {
Log.WriteError(string.Format("File {0} not found", path), null); Log.WriteError(string.Format("File {0} not found", path), null);
return; return;
} }
if (ServiceController.GetServices().Any(s => s.DisplayName.Equals(service, StringComparison.CurrentCultureIgnoreCase)))
Log.WriteStart(string.Format("Registering \"{0}\" windows service", service));
string domain = Context.UserDomain;
if (string.IsNullOrEmpty(domain))
domain = ".";
string arguments = string.Format("/i /LogFile=\"\" /user={0}\\{1} /password={2}",
domain, Context.UserAccount, Context.UserPassword);
int exitCode = Utils.RunProcess(path, arguments);
if (exitCode == 0)
{ {
var Msg = string.Format("Service \"{0}\" already installed.", service);
Log.WriteEnd(Msg);
InstallLog.AppendLine(Msg);
}
try
{
string domain = Context.UserDomain;
if (string.IsNullOrEmpty(domain))
domain = ".";
string arguments = string.Empty;
if (Context.UseUserCredentials)
arguments = string.Format("/i /LogFile=\"\" /user={0}\\{1} /password={2}", domain, Context.UserAccount, Context.UserPassword);
else
arguments = "/i /LogFile= ''";
ManagedInstallerClass.InstallHelper(new[] { arguments, path });
//add rollback action //add rollback action
RollBack.RegisterWindowsService(path, service); RollBack.RegisterWindowsService(path, service);
var Msg = string.Format("Registered \"{0}\" Windows service ", service);
//update log //update log
Log.WriteEnd("Registered windows service"); Log.WriteEnd(Msg);
//update install log //update install log
InstallLog.AppendLine(string.Format("- Registered \"{0}\" Windows service ", service)); InstallLog.AppendLine(Msg);
// update config setings
AppConfig.EnsureComponentConfig(componentId);
AppConfig.SetComponentSettingStringValue(componentId, "ServiceName", service);
AppConfig.SetComponentSettingStringValue(componentId, "ServiceFile", path);
AppConfig.SaveConfiguration();
} }
else catch (Exception ex)
{ {
Log.WriteError(string.Format("Unable to register \"{0}\" Windows service. Error code: {1}", service, exitCode), null); Log.WriteError(string.Format("Unable to register \"{0}\" Windows service.", service), null);
InstallLog.AppendLine(string.Format("- Failed to register \"{0}\" windows service ", service)); InstallLog.AppendLine(string.Format("- Failed to register \"{0}\" windows service ", service));
} }
// update config setings
AppConfig.SetComponentSettingStringValue(componentId, "ServiceName", Context.ServiceName);
AppConfig.SetComponentSettingStringValue(componentId, "ServiceFile", Context.ServiceFile);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -2739,7 +2764,7 @@ namespace WebsitePanel.Setup.Internal
BackupDatabase(action.ConnectionString, action.Name); BackupDatabase(action.ConnectionString, action.Name);
break; break;
case ActionTypes.BackupConfig: case ActionTypes.BackupConfig:
BackupConfig(action.Path, destinationDirectory); BackupConfig(action.Path, destinationDirectory, action.SetupVariables != null ? action.SetupVariables.FileNameMap : null);
break; break;
} }
} }
@ -2755,7 +2780,7 @@ namespace WebsitePanel.Setup.Internal
} }
} }
private void BackupConfig(string path, string backupDirectory) private void BackupConfig(string path, string backupDirectory, IDictionary<string, string> NameMap = null)
{ {
try try
{ {
@ -2772,7 +2797,7 @@ namespace WebsitePanel.Setup.Internal
string[] files = Directory.GetFiles(path, "*.config", SearchOption.TopDirectoryOnly); string[] files = Directory.GetFiles(path, "*.config", SearchOption.TopDirectoryOnly);
foreach (string file in files) foreach (string file in files)
{ {
FileUtils.CopyFileToFolder(file, destination); FileUtils.CopyFileToFolder(file, destination, GetMappedFileName(file, NameMap));
} }
Log.WriteEnd("Backed up system configuration"); Log.WriteEnd("Backed up system configuration");
InstallLog.AppendLine("- Backed up system configuration"); InstallLog.AppendLine("- Backed up system configuration");
@ -2786,6 +2811,17 @@ namespace WebsitePanel.Setup.Internal
} }
} }
private string GetMappedFileName(string FullFileName, IDictionary<string, string> Map)
{
if (Map == null)
return "";
string Key = new FileInfo(FullFileName).Name;
if (Map.Keys.Contains(Key))
return Map[Key];
else
return "";
}
private void BackupDatabase(string connectionString, string database) private void BackupDatabase(string connectionString, string database)
{ {
try try
@ -2859,7 +2895,6 @@ namespace WebsitePanel.Setup.Internal
{ {
List<InstallAction> list = new List<InstallAction>(); List<InstallAction> list = new List<InstallAction>();
InstallAction action = null; InstallAction action = null;
//database //database
string connectionString = AppConfig.GetComponentSettingStringValue(componentId, "InstallConnectionString"); string connectionString = AppConfig.GetComponentSettingStringValue(componentId, "InstallConnectionString");
if (!String.IsNullOrEmpty(connectionString)) if (!String.IsNullOrEmpty(connectionString))
@ -2871,7 +2906,6 @@ namespace WebsitePanel.Setup.Internal
action.Description = string.Format("Backing up database {0}...", database); action.Description = string.Format("Backing up database {0}...", database);
list.Add(action); list.Add(action);
} }
//directory //directory
string path = AppConfig.GetComponentSettingStringValue(componentId, "InstallFolder"); string path = AppConfig.GetComponentSettingStringValue(componentId, "InstallFolder");
if (!string.IsNullOrEmpty(path)) if (!string.IsNullOrEmpty(path))
@ -2881,17 +2915,18 @@ namespace WebsitePanel.Setup.Internal
action.Description = string.Format("Backing up directory {0}...", path); action.Description = string.Format("Backing up directory {0}...", path);
list.Add(action); list.Add(action);
} }
//config //config
action = new InstallAction(ActionTypes.BackupConfig); action = new InstallAction(ActionTypes.BackupConfig);
action.Description = "Backing up configuration settings...";
action.Path = Context.BaseDirectory; action.Path = Context.BaseDirectory;
action.Description = "Backing up configuration settings...";
if (!string.IsNullOrWhiteSpace(Context.SpecialBaseDirectory) )
{
action.Path = Context.SpecialBaseDirectory;
action.SetupVariables = Context;
}
list.Add(action); list.Add(action);
return list; return list;
} }
private void UpdateWebSiteBindings() private void UpdateWebSiteBindings()
{ {
string component = Context.ComponentFullName; string component = Context.ComponentFullName;
@ -3781,9 +3816,9 @@ namespace WebsitePanel.Setup.Internal
{ {
//update settings //update settings
AppConfig.SetComponentSettingStringValue(componentId, "Release", Context.UpdateVersion); AppConfig.SetComponentSettingStringValue(componentId, "Release", Context.UpdateVersion);
AppConfig.SetComponentSettingStringValue(componentId, "Installer", Context.Installer); AppConfig.SetComponentSettingStringValue(componentId, "Installer", Context.SessionVariables["Installer"]);
AppConfig.SetComponentSettingStringValue(componentId, "InstallerType", Context.InstallerType); AppConfig.SetComponentSettingStringValue(componentId, "InstallerType", Context.SessionVariables["InstallerType"]);
AppConfig.SetComponentSettingStringValue(componentId, "InstallerPath", Context.InstallerPath); AppConfig.SetComponentSettingStringValue(componentId, "InstallerPath", Context.SessionVariables["InstallerPath"]);
} }
Log.WriteInfo("Saving system configuration"); Log.WriteInfo("Saving system configuration");
@ -3928,6 +3963,13 @@ namespace WebsitePanel.Setup.Internal
{ {
try try
{ {
XmlDocumentMerge.KeyAttributes = new List<string> { "name", "id", "key", "pageID", "localName", "xmlns", "privatePath", "moduleDefinitionID", "ref", "verb;path", "controlRenderingCompatibilityVersion;clientIDMode" };
XmlDocumentMerge.FrozenAttributes = new List<XmlDocumentMerge.FrozenAttrTag>
{
new XmlDocumentMerge.FrozenAttrTag() { Path="configuration/microsoft.web.services3/security/securityTokenManager/add", Attributes = new List<string>() {"type"} },
new XmlDocumentMerge.FrozenAttrTag(true) { Path="compilation", Attributes = new List<string>() {"targetFramework"} },
new XmlDocumentMerge.FrozenAttrTag() { Path="configuration/startup/supportedRuntime", Attributes = new List<string>() {"version", "sku" } }
};
Log.WriteStart("RestoreXmlConfigs"); Log.WriteStart("RestoreXmlConfigs");
var Backup = BackupRestore.Find(Ctx.InstallerFolder, Global.DefaultProductName, Ctx.ComponentName); var Backup = BackupRestore.Find(Ctx.InstallerFolder, Global.DefaultProductName, Ctx.ComponentName);
switch(Ctx.ComponentCode) switch(Ctx.ComponentCode)
@ -3940,21 +3982,13 @@ namespace WebsitePanel.Setup.Internal
case Global.EntServer.ComponentCode: case Global.EntServer.ComponentCode:
{ {
Backup.XmlFiles.Add("Web.config"); Backup.XmlFiles.Add("Web.config");
Backup.XmlFiles.Add(@"bin\WebsitePanel.SchedulerService.exe.config");
} }
break; break;
case Global.WebPortal.ComponentCode: case Global.WebPortal.ComponentCode:
{ {
Backup.XmlFiles.Add("Web.config"); Backup.XmlFiles.Add("Web.config");
Backup.XmlFiles.Add(@"App_Data\Countries.config");
Backup.XmlFiles.Add(@"App_Data\CountryStates.config");
Backup.XmlFiles.Add(@"App_Data\Ecommerce_Modules.config");
Backup.XmlFiles.Add(@"App_Data\Ecommerce_Pages.config");
Backup.XmlFiles.Add(@"App_Data\ESModule_ControlsHierarchy.config");
Backup.XmlFiles.Add(@"App_Data\ModulesData.config");
Backup.XmlFiles.Add(@"App_Data\SiteSettings.config"); Backup.XmlFiles.Add(@"App_Data\SiteSettings.config");
Backup.XmlFiles.Add(@"App_Data\SupportedLocales.config");
Backup.XmlFiles.Add(@"App_Data\SupportedThemes.config");
Backup.XmlFiles.Add(@"App_Data\WebsitePanel_Modules.config");
Backup.XmlFiles.Add(@"App_Data\WebsitePanel_Pages.config"); Backup.XmlFiles.Add(@"App_Data\WebsitePanel_Pages.config");
} }
break; break;
@ -3978,6 +4012,52 @@ namespace WebsitePanel.Setup.Internal
throw; throw;
} }
} }
private void UpdateXml(string FullFileName, IDictionary<string, string[]> Data)
{
var Msg = "Update xml files.";
try
{
Log.WriteStart(Msg);
if (!File.Exists(FullFileName))
throw new FileNotFoundException(FullFileName);
var Doc = new XmlDocument();
Doc.Load(FullFileName);
foreach(var Key in Data.Keys)
{
var Node = Doc.SelectSingleNode(Key) as XmlElement;
if (Node == null)
{
Log.WriteInfo(string.Format("XPath \"{0}\" not found.", Key));
}
else
{
var Value = Data[Key];
switch (Value.Length)
{
case 1:
Node.Value = Value[0];
break;
case 2:
Node.SetAttribute(Value[0], Value[1]);
break;
default:
Log.WriteError(string.Format("Bad xml value for \"{0}\".", Key));
break;
}
}
}
Doc.Save(FullFileName);
}
catch (Exception ex)
{
Log.WriteError(ex.ToString());
throw;
}
finally
{
Log.WriteEnd(Msg);
}
}
} }
public class UninstallScript : SetupScript // UninstallPage public class UninstallScript : SetupScript // UninstallPage
{ {
@ -3989,7 +4069,6 @@ namespace WebsitePanel.Setup.Internal
{ {
var list = base.GetActions(componentId); var list = base.GetActions(componentId);
InstallAction action = null; InstallAction action = null;
//windows service //windows service
string serviceName = AppConfig.GetComponentSettingStringValue(componentId, "ServiceName"); string serviceName = AppConfig.GetComponentSettingStringValue(componentId, "ServiceName");
string serviceFile = AppConfig.GetComponentSettingStringValue(componentId, "ServiceFile"); string serviceFile = AppConfig.GetComponentSettingStringValue(componentId, "ServiceFile");
@ -3997,16 +4076,18 @@ namespace WebsitePanel.Setup.Internal
if (!string.IsNullOrEmpty(serviceName) && !string.IsNullOrEmpty(serviceFile)) if (!string.IsNullOrEmpty(serviceName) && !string.IsNullOrEmpty(serviceFile))
{ {
action = new InstallAction(ActionTypes.UnregisterWindowsService); action = new InstallAction(ActionTypes.UnregisterWindowsService);
action.Path = Path.Combine(installFolder, serviceFile); action.Path = serviceFile; // FullFileName.
action.Name = serviceName; action.Name = serviceName;
action.Description = "Removing Windows service..."; action.Description = "Removing Windows service...";
action.Log = string.Format("- Remove {0} Windows service", serviceName); action.Log = string.Format("- Remove {0} Windows service", serviceName);
list.Add(action); list.Add(action);
} }
//database //database
bool deleteDatabase = AppConfig.GetComponentSettingBooleanValue(componentId, "NewDatabase"); bool deleteDatabase = AppConfig.GetComponentSettingBooleanValue(componentId, "NewDatabase");
if (deleteDatabase) bool allowDelete = true;
if (Context.InstallerType.ToLowerInvariant().Equals("msi")) // DB handled by MSI (WiX) by default.
allowDelete = false;
if (deleteDatabase && allowDelete)
{ {
string connectionString = AppConfig.GetComponentSettingStringValue(componentId, "InstallConnectionString"); string connectionString = AppConfig.GetComponentSettingStringValue(componentId, "InstallConnectionString");
string database = AppConfig.GetComponentSettingStringValue(componentId, "Database"); string database = AppConfig.GetComponentSettingStringValue(componentId, "Database");
@ -4042,7 +4123,6 @@ namespace WebsitePanel.Setup.Internal
action.Log = string.Format("- Delete {0} database login", loginName); action.Log = string.Format("- Delete {0} database login", loginName);
list.Add(action); list.Add(action);
} }
//virtual directory //virtual directory
bool deleteVirtualDirectory = AppConfig.GetComponentSettingBooleanValue(componentId, "NewVirtualDirectory"); bool deleteVirtualDirectory = AppConfig.GetComponentSettingBooleanValue(componentId, "NewVirtualDirectory");
if (deleteVirtualDirectory) if (deleteVirtualDirectory)
@ -4056,7 +4136,6 @@ namespace WebsitePanel.Setup.Internal
action.Log = string.Format("- Delete {0} virtual directory...", virtualDirectory); action.Log = string.Format("- Delete {0} virtual directory...", virtualDirectory);
list.Add(action); list.Add(action);
} }
//web site //web site
bool deleteWebSite = AppConfig.GetComponentSettingBooleanValue(componentId, "NewWebSite"); bool deleteWebSite = AppConfig.GetComponentSettingBooleanValue(componentId, "NewWebSite");
if (deleteWebSite) if (deleteWebSite)
@ -4068,7 +4147,6 @@ namespace WebsitePanel.Setup.Internal
action.Log = string.Format("- Delete {0} web site", siteId); action.Log = string.Format("- Delete {0} web site", siteId);
list.Add(action); list.Add(action);
} }
//application pool //application pool
bool deleteAppPool = AppConfig.GetComponentSettingBooleanValue(componentId, "NewApplicationPool"); bool deleteAppPool = AppConfig.GetComponentSettingBooleanValue(componentId, "NewApplicationPool");
if (deleteAppPool) if (deleteAppPool)
@ -4082,7 +4160,6 @@ namespace WebsitePanel.Setup.Internal
action.Log = string.Format("- Delete {0} application pool", appPoolName); action.Log = string.Format("- Delete {0} application pool", appPoolName);
list.Add(action); list.Add(action);
} }
//user account //user account
bool deleteUserAccount = AppConfig.GetComponentSettingBooleanValue(componentId, "NewUserAccount"); bool deleteUserAccount = AppConfig.GetComponentSettingBooleanValue(componentId, "NewUserAccount");
if (deleteUserAccount) if (deleteUserAccount)
@ -4100,7 +4177,6 @@ namespace WebsitePanel.Setup.Internal
action.Log = string.Format("- Remove {0} user account membership", username); action.Log = string.Format("- Remove {0} user account membership", username);
list.Add(action); list.Add(action);
} }
action = new InstallAction(ActionTypes.DeleteUserAccount); action = new InstallAction(ActionTypes.DeleteUserAccount);
action.Name = username; action.Name = username;
action.Domain = domain; action.Domain = domain;
@ -4242,7 +4318,6 @@ namespace WebsitePanel.Setup.Internal
else if (ModeExtension == ModeExtension.Restore) else if (ModeExtension == ModeExtension.Restore)
{ {
Context.ComponentId = GetComponentID(Context); Context.ComponentId = GetComponentID(Context);
Context.UpdateVersion = Context.Release;
AppConfig.LoadComponentSettings(Context); AppConfig.LoadComponentSettings(Context);
new RestoreScript(Context).Run(); new RestoreScript(Context).Run();
} }
@ -4320,9 +4395,24 @@ namespace WebsitePanel.Setup.Internal
else if (ModeExtension == ModeExtension.Restore) else if (ModeExtension == ModeExtension.Restore)
{ {
Context.ComponentId = GetComponentID(Context); Context.ComponentId = GetComponentID(Context);
Context.UpdateVersion = Context.Release; Context.UseUserCredentials = false;
AppConfig.LoadComponentSettings(Context); AppConfig.LoadComponentSettings(Context);
new RestoreScript(Context).Run(); if (string.IsNullOrWhiteSpace(Context.ServiceName) || string.IsNullOrWhiteSpace(Context.ServiceFile))
{
Context.ServiceName = Global.Parameters.SchedulerServiceName;
Context.ServiceFile = Path.Combine(Context.InstallationFolder, "bin", Global.Parameters.SchedulerServiceFileName);
}
SetupScript Script = new RestoreScript(Context);
Script.Run();
Script = new ExpressScript(Context);
var XmlUp = new Dictionary<string, string[]>();
XmlUp.Add("configuration/connectionStrings/add[@name='EnterpriseServer']", new string[] {"connectionString", Context.ConnectionString});
XmlUp.Add("configuration/appSettings/add[@key='WebsitePanel.CryptoKey']", new string[] {"value", Context.CryptoKey });
Context.XmlData = XmlUp;
Script.Actions.Add(new InstallAction(ActionTypes.UpdateXml) { SetupVariables = Context, Path = string.Format("{0}.config", Context.ServiceFile) });
Script.Actions.Add(new InstallAction(ActionTypes.RegisterWindowsService));
Script.Actions.Add(new InstallAction(ActionTypes.StartWindowsService));
Script.Run();
} }
else else
throw new NotImplementedException("Install " + ModeExtension.ToString()); throw new NotImplementedException("Install " + ModeExtension.ToString());
@ -4398,7 +4488,6 @@ namespace WebsitePanel.Setup.Internal
else if (ModeExtension == ModeExtension.Restore) else if (ModeExtension == ModeExtension.Restore)
{ {
Context.ComponentId = GetComponentID(Context); Context.ComponentId = GetComponentID(Context);
Context.UpdateVersion = Context.Release;
AppConfig.LoadComponentSettings(Context); AppConfig.LoadComponentSettings(Context);
new RestoreScript(Context).Run(); new RestoreScript(Context).Run();
} }

View file

@ -8,14 +8,46 @@ namespace WebsitePanel.Setup.Internal
{ {
public static class XmlDocumentMerge public static class XmlDocumentMerge
{ {
public class AttrTag
{
public AttrTag()
: this(null)
{
}
public AttrTag(params string[] Attributes)
{
this.Attributes = Attributes;
Priority = Attributes == null ? 0 : (ulong)Attributes.LongLength;
}
public ulong Priority { get; private set; }
public string[] Attributes;
}
public class FrozenAttrTag
{
public FrozenAttrTag()
: this(false)
{
}
public FrozenAttrTag(bool Relative)
{
IsRelative = Relative;
}
public string Path { get; set; }
public IList<string> Attributes { get; set; }
public bool IsRelative { get; private set; }
}
const string SuccessFormat = "Success: {0}."; const string SuccessFormat = "Success: {0}.";
const string ErrorFormat = "Error: {0}."; const string ErrorFormat = "Error: {0}.";
const string MergeCompleted = "XmlDocumentMerge completed"; const string MergeCompleted = "XmlDocumentMerge completed";
static XmlDocumentMerge() static XmlDocumentMerge()
{ {
KeyAttributes = new List<string> { "name", "id", "key" }; KeyAttributes = new List<string>();
FrozenAttributes = new List<FrozenAttrTag>();
} }
public static List<string> KeyAttributes { get; set; } public static IList<string> KeyAttributes { get; set; }
public static IList<FrozenAttrTag> FrozenAttributes { get; set; }
public static string Process(string Src, string Dst, string SaveTo = "") public static string Process(string Src, string Dst, string SaveTo = "")
{ {
var Result = string.Empty; var Result = string.Empty;
@ -83,57 +115,97 @@ namespace WebsitePanel.Setup.Internal
} }
private static string NodeView(XPathNavigator Navi) private static string NodeView(XPathNavigator Navi)
{ {
foreach (var Attr in KeyAttributes) foreach (var Item in GetProcessingChain(KeyAttributes))
{ {
var Value = Navi.GetAttribute(Attr, string.Empty); string Result = string.Empty;
if (!string.IsNullOrWhiteSpace(Value)) foreach (var Attr in Item.Attributes)
return string.Format("{0}[@{1}='{2}']", Navi.Name, Attr, Value); {
var Value = Navi.GetAttribute(Attr, string.Empty);
if (string.IsNullOrWhiteSpace(Value))
{
Result = string.Empty;
continue;
}
else
{
if (string.IsNullOrWhiteSpace(Result))
Result = string.Format("@{0}='{1}'", Attr, Value);
else
Result = string.Format("{0} and @{1}='{2}'", Result, Attr, Value);
}
}
if (!string.IsNullOrWhiteSpace(Result))
return string.Format("{0}[{1}]", Navi.Name, Result);
} }
return Navi.Name; return Navi.Name;
} }
private static void Merge(XPathNavigator DstNavi, XmlDocument SrcDoc, string Parent) private static void Merge(XPathNavigator DstNavi, XmlDocument SrcDoc, string Parent)
{ {
if (DstNavi.NodeType == XPathNodeType.Element) var Current = NodePath(Parent, NodeView(DstNavi));
if (!string.IsNullOrWhiteSpace(Current))
{ {
var SrcElem = SrcDoc.SelectSingleNode(NodePath(Parent, NodeView(DstNavi))); if (DstNavi.NodeType == XPathNodeType.Element)
if (SrcElem != null)
{ {
if (DstNavi.MoveToFirstAttribute()) var SrcElem = SrcDoc.SelectSingleNode(Current);
if (SrcElem != null)
{ {
do var Frozen = GetFrozenAttributes(Current, FrozenAttributes);
if (DstNavi.MoveToFirstAttribute())
{ {
var SrcElemAttr = SrcElem.Attributes[DstNavi.LocalName]; do
if (SrcElemAttr != null) {
DstNavi.SetValue(SrcElemAttr.Value); var SrcElemAttr = SrcElem.Attributes[DstNavi.LocalName];
if (SrcElemAttr != null && CanProcess(DstNavi.LocalName, Frozen))
DstNavi.SetValue(SrcElemAttr.Value);
}
while (DstNavi.MoveToNextAttribute());
DstNavi.MoveToParent();
} }
while (DstNavi.MoveToNextAttribute());
DstNavi.MoveToParent();
} }
} }
} else if (DstNavi.NodeType == XPathNodeType.Text)
else if (DstNavi.NodeType == XPathNodeType.Text)
{
var SrcElem = SrcDoc.SelectSingleNode(NodePath(Parent, NodeView(DstNavi)));
if (SrcElem != null)
DstNavi.SetValue(SrcElem.InnerText);
}
var Here = NodeView(DstNavi);
if (DstNavi.MoveToFirstChild())
{
do
{ {
Merge(DstNavi, SrcDoc, NodePath(Parent, Here)); var SrcElem = SrcDoc.SelectSingleNode(Current);
if (SrcElem != null)
DstNavi.SetValue(SrcElem.InnerText);
}
if (DstNavi.MoveToFirstChild())
{
do
{
Merge(DstNavi, SrcDoc, Current);
}
while (DstNavi.MoveToNext());
DstNavi.MoveToParent();
}
else if (DstNavi.NodeType == XPathNodeType.Element)
{
var SrcElem = SrcDoc.SelectSingleNode(Current);
if (SrcElem != null && !string.IsNullOrWhiteSpace(SrcElem.InnerXml))
foreach (XmlNode Child in SrcElem.ChildNodes)
DstNavi.AppendChild(Child.CloneNode(true).CreateNavigator());
} }
while (DstNavi.MoveToNext());
DstNavi.MoveToParent();
}
else if (DstNavi.NodeType == XPathNodeType.Element)
{
var SrcElem = SrcDoc.SelectSingleNode(NodePath(Parent, Here));
if (SrcElem != null && !string.IsNullOrWhiteSpace(SrcElem.InnerXml))
foreach (XmlNode Child in SrcElem.ChildNodes)
DstNavi.AppendChild(Child.CloneNode(true).CreateNavigator());
} }
} }
private static IList<AttrTag> GetProcessingChain(IEnumerable<string> Attributes)
{
var Delimiter = ";";
var Chain = new List<AttrTag>();
foreach (var Attribute in Attributes)
Chain.Add(new AttrTag(Attribute.Split(new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries)));
Chain.Sort(delegate(AttrTag a, AttrTag b) { return a.Priority == b.Priority ? 0 : a.Priority > b.Priority ? -1 : 1; });
return Chain;
}
private static FrozenAttrTag GetFrozenAttributes(string Path, IEnumerable<FrozenAttrTag> Frozens)
{
foreach (var Frozen in Frozens)
if (Frozen.IsRelative ? Path.IndexOf(Frozen.Path, 1) == -1 : Path.StartsWith(Frozen.Path))
return Frozen;
return null;
}
private static bool CanProcess(string Name, FrozenAttrTag Frozen)
{
return Frozen == null ? true : !Frozen.Attributes.Contains(Name);
}
} }
} }

View file

@ -43,6 +43,13 @@ namespace WebsitePanel.WIXInstaller.Common
Result |= CheckAspNetRegValue(LMKey); Result |= CheckAspNetRegValue(LMKey);
return Result; return Result;
} }
public static bool AppPoolExists(string Pool)
{
if (GetWebServerVersion().Major > MINIMUM_WEBSERVER_MAJOR_VERSION)
return WebUtils.IIS7ApplicationPoolExists(Pool);
else
return WebUtils.ApplicationPoolExists(Pool);
}
public static bool CheckAspNetRegValue(RegistryKey BaseKey) public static bool CheckAspNetRegValue(RegistryKey BaseKey)
{ {
var WebComponentsKey = "SOFTWARE\\Microsoft\\InetStp\\Components"; var WebComponentsKey = "SOFTWARE\\Microsoft\\InetStp\\Components";

View file

@ -52,9 +52,44 @@ namespace WebsitePanel.WIXInstaller
{ {
public static List<string> SysDb = new List<string> { "tempdb", "master", "model", "msdb" }; public static List<string> SysDb = new List<string> { "tempdb", "master", "model", "msdb" };
public const string CustomDataDelimiter = "-=del=-"; public const string CustomDataDelimiter = "-=del=-";
public const string SQL_AUTH_WINDOWS = "Windows Authentication";
public const string SQL_AUTH_SERVER = "SQL Server Authentication";
#region CustomActions #region CustomActions
[CustomAction] [CustomAction]
public static ActionResult OnServerPrepare(Session Ctx)
{
PopUpDebugger();
Ctx.AttachToSetupLog();
Log.WriteStart("OnServerPrepare");
GetPrepareScript(Ctx).Run();
Log.WriteEnd("OnServerPrepare");
return ActionResult.Success;
}
[CustomAction]
public static ActionResult OnEServerPrepare(Session Ctx)
{
PopUpDebugger();
Ctx.AttachToSetupLog();
Log.WriteStart("OnEServerPrepare");
GetPrepareScript(Ctx).Run();
Log.WriteEnd("OnEServerPrepare");
return ActionResult.Success;
}
[CustomAction]
public static ActionResult OnPortalPrepare(Session Ctx)
{
PopUpDebugger();
Ctx.AttachToSetupLog();
Log.WriteStart("OnPortalPrepare");
GetPrepareScript(Ctx).Run();
Log.WriteEnd("OnPortalPrepare");
return ActionResult.Success;
}
[CustomAction]
public static ActionResult MaintenanceServer(Session session) public static ActionResult MaintenanceServer(Session session)
{ {
var Result = ActionResult.Success; var Result = ActionResult.Success;
@ -84,104 +119,147 @@ namespace WebsitePanel.WIXInstaller
[CustomAction] [CustomAction]
public static ActionResult PreFillSettings(Session session) public static ActionResult PreFillSettings(Session session)
{ {
PopUpDebugger(); Func<string, bool> HaveInstalledComponents = (string CfgFullPath) =>
var Ctx = session;
Ctx.AttachToSetupLog();
Log.WriteStart("PreFillSettings");
var WSP = Ctx["WEBSITEPANELDIR"];
var CfgStr = string.Empty;
Func<string, string> GetCfg = (string CfgDir) =>
{ {
if (Directory.Exists(CfgDir)) var ComponentsPath = "//components";
return File.Exists(CfgFullPath) ? BackupRestore.HaveChild(CfgFullPath, ComponentsPath) : false;
};
Func<IEnumerable<string>, string> FindMainConfig = (IEnumerable<string> Dirs) =>
{
// Looking into directories with next priority:
// Previous installation directory and her backup, "WebsitePanel" directories on fixed drives and their backups.
// The last chance is an update from an installation based on previous installer version that installed to "Program Files".
// Regular directories.
foreach (var Dir in Dirs)
{ {
var CfgFile = Path.Combine(CfgDir, BackupRestore.MainConfig); var Result = Path.Combine(Dir, BackupRestore.MainConfig);
if (File.Exists(CfgFile) && BackupRestore.HaveChild(CfgFile, "//components")) if (HaveInstalledComponents(Result))
return CfgFile; {
return Result;
}
else else
{ {
var Names = new string[] { Global.Server.ComponentName, Global.EntServer.ComponentName, Global.WebPortal.ComponentName }; var ComponentNames = new string[] { Global.Server.ComponentName, Global.EntServer.ComponentName, Global.WebPortal.ComponentName };
foreach (var Name in Names) foreach (var Name in ComponentNames)
{ {
var Backup = BackupRestore.Find(CfgDir, Global.DefaultProductName, Name); var Backup = BackupRestore.Find(Dir, Global.DefaultProductName, Name);
if (Backup != null && BackupRestore.HaveChild(Backup.BackupMainConfigFile, "//components")) if (Backup != null && HaveInstalledComponents(Backup.BackupMainConfigFile))
return CfgStr = Backup.BackupMainConfigFile; return Backup.BackupMainConfigFile;
} }
} }
} }
return string.Empty; // Looking into platform specific Program Files.
};
Func<Session, string, string, bool> SetProperty = (Session CtxSession, string Prop, string Value) =>
{
if(!string.IsNullOrWhiteSpace(Value))
{ {
CtxSession[Prop] = Value; var InstallerMainCfg = "WebsitePanel.Installer.exe.config";
return true; var InstallerName = "WebsitePanel Installer";
var PFolderType = Environment.Is64BitOperatingSystem ? Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles;
var PFiles = Environment.GetFolderPath(PFolderType);
var Result = Path.Combine(PFiles, InstallerName, InstallerMainCfg);
if (HaveInstalledComponents(Result))
return Result;
} }
return false; return null;
}; };
CfgStr = GetCfg(WSP);
if(string.IsNullOrWhiteSpace(CfgStr)) var Ctx = session;
{ Ctx.AttachToSetupLog();
var Drives = from Drive in DriveInfo.GetDrives() where Drive.DriveType == DriveType.Fixed select Drive;
foreach(var Drive in Drives) PopUpDebugger();
{
var Dir = Path.Combine(Drive.RootDirectory.FullName, Global.DefaultProductName); Log.WriteStart("PreFillSettings");
CfgStr = GetCfg(Dir); var WSP = Ctx["WSP_INSTALL_DIR"];
if (!string.IsNullOrWhiteSpace(CfgStr)) var DirList = new List<string>();
break; DirList.Add(WSP);
} DirList.AddRange(from Drive in DriveInfo.GetDrives()
} where Drive.DriveType == DriveType.Fixed
if (!string.IsNullOrWhiteSpace(CfgStr)) select Path.Combine(Drive.RootDirectory.FullName, Global.DefaultProductName));
var CfgPath = FindMainConfig(DirList);
if (!string.IsNullOrWhiteSpace(CfgPath))
{ {
var EServerUrl = string.Empty; var EServerUrl = string.Empty;
AppConfig.LoadConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = CfgStr }); AppConfig.LoadConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = CfgPath });
var CtxVars = new SetupVariables(); var CtxVars = new SetupVariables();
CtxVars.ComponentId = WiXSetup.GetComponentID(CfgStr, Global.Server.ComponentCode); CtxVars.ComponentId = WiXSetup.GetComponentID(CfgPath, Global.Server.ComponentCode);
if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId)) if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId))
{ {
AppConfig.LoadComponentSettings(CtxVars); AppConfig.LoadComponentSettings(CtxVars);
Ctx["COMPFOUND_SERVER"] = "1";
SetProperty(Ctx, "COMPFOUND_SERVER_ID", CtxVars.ComponentId);
SetProperty(Ctx, "COMPFOUND_SERVER_MAIN_CFG", CfgPath);
SetProperty(Ctx, "PI_SERVER_IP", CtxVars.WebSiteIP); SetProperty(Ctx, "PI_SERVER_IP", CtxVars.WebSiteIP);
SetProperty(Ctx, "PI_SERVER_PORT", CtxVars.WebSitePort); SetProperty(Ctx, "PI_SERVER_PORT", CtxVars.WebSitePort);
SetProperty(Ctx, "PI_SERVER_HOST", CtxVars.WebSiteDomain); SetProperty(Ctx, "PI_SERVER_HOST", CtxVars.WebSiteDomain);
SetProperty(Ctx, "PI_SERVER_LOGIN", CtxVars.UserAccount); SetProperty(Ctx, "PI_SERVER_LOGIN", CtxVars.UserAccount);
SetProperty(Ctx, "PI_SERVER_PASSWORD", CtxVars.UserPassword);
SetProperty(Ctx, "PI_SERVER_PASSWORD_CONFIRM",CtxVars.UserPassword);
SetProperty(Ctx, "PI_SERVER_DOMAIN", CtxVars.UserDomain); SetProperty(Ctx, "PI_SERVER_DOMAIN", CtxVars.UserDomain);
SetProperty(Ctx, "SERVER_ACCESS_PASSWORD", CtxVars.ServerPassword);
SetProperty(Ctx, "SERVER_ACCESS_PASSWORD_CONFIRM", CtxVars.ServerPassword); SetProperty(Ctx, "PI_SERVER_INSTALL_DIR", CtxVars.InstallFolder);
SetProperty(Ctx, "WSP_INSTALL_DIR", Directory.GetParent(CtxVars.InstallFolder).FullName);
var HaveAccount = SecurityUtils.UserExists(CtxVars.UserDomain, CtxVars.UserAccount);
bool HavePool = Tool.AppPoolExists(CtxVars.ApplicationPool);
Ctx["COMPFOUND_SERVER"] = (HaveAccount && HavePool) ? YesNo.Yes : YesNo.No;
} }
CtxVars.ComponentId = WiXSetup.GetComponentID(CfgStr, Global.EntServer.ComponentCode); CtxVars.ComponentId = WiXSetup.GetComponentID(CfgPath, Global.EntServer.ComponentCode);
if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId)) if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId))
{ {
AppConfig.LoadComponentSettings(CtxVars); AppConfig.LoadComponentSettings(CtxVars);
Ctx["COMPFOUND_ESERVER"] = "1";
SetProperty(Ctx, "COMPFOUND_ESERVER_ID", CtxVars.ComponentId);
SetProperty(Ctx, "COMPFOUND_ESERVER_MAIN_CFG", CfgPath);
SetProperty(Ctx, "PI_ESERVER_IP", CtxVars.WebSiteIP); SetProperty(Ctx, "PI_ESERVER_IP", CtxVars.WebSiteIP);
SetProperty(Ctx, "PI_ESERVER_PORT", CtxVars.WebSitePort); SetProperty(Ctx, "PI_ESERVER_PORT", CtxVars.WebSitePort);
SetProperty(Ctx, "PI_ESERVER_HOST", CtxVars.WebSiteDomain); SetProperty(Ctx, "PI_ESERVER_HOST", CtxVars.WebSiteDomain);
SetProperty(Ctx, "PI_ESERVER_LOGIN", CtxVars.UserAccount); SetProperty(Ctx, "PI_ESERVER_LOGIN", CtxVars.UserAccount);
SetProperty(Ctx, "PI_ESERVER_PASSWORD", CtxVars.UserPassword);
SetProperty(Ctx, "PI_ESERVER_PASSWORD_CONFIRM", CtxVars.UserPassword);
SetProperty(Ctx, "PI_ESERVER_DOMAIN", CtxVars.UserDomain); SetProperty(Ctx, "PI_ESERVER_DOMAIN", CtxVars.UserDomain);
SetProperty(Ctx, "SERVERADMIN_PASSWORD", CtxVars.ServerAdminPassword);
SetProperty(Ctx, "SERVERADMIN_PASSWORD_CONFIRM", CtxVars.ServerAdminPassword);
EServerUrl = string.Format("http://{0}:{1}", CtxVars.WebSiteIP, CtxVars.WebSitePort); EServerUrl = string.Format("http://{0}:{1}", CtxVars.WebSiteIP, CtxVars.WebSitePort);
SetProperty(Ctx, "PI_ESERVER_INSTALL_DIR", CtxVars.InstallFolder);
SetProperty(Ctx, "WSP_INSTALL_DIR", Directory.GetParent(CtxVars.InstallFolder).FullName);
var ConnStr = new SqlConnectionStringBuilder(CtxVars.DbInstallConnectionString);
SetProperty(Ctx, "DB_CONN", ConnStr.ToString());
SetProperty(Ctx, "DB_SERVER", ConnStr.DataSource);
SetProperty(Ctx, "DB_AUTH", ConnStr.IntegratedSecurity ? SQL_AUTH_WINDOWS : SQL_AUTH_SERVER);
if (!ConnStr.IntegratedSecurity)
{
SetProperty(Ctx, "DB_LOGIN", ConnStr.UserID);
SetProperty(Ctx, "DB_PASSWORD", ConnStr.Password);
}
ConnStr = new SqlConnectionStringBuilder(CtxVars.ConnectionString);
SetProperty(Ctx, "DB_DATABASE", ConnStr.InitialCatalog);
var HaveAccount = SecurityUtils.UserExists(CtxVars.UserDomain, CtxVars.UserAccount);
bool HavePool = Tool.AppPoolExists(CtxVars.ApplicationPool);
Ctx["COMPFOUND_ESERVER"] = (HaveAccount && HavePool) ? YesNo.Yes : YesNo.No;
} }
CtxVars.ComponentId = WiXSetup.GetComponentID(CfgStr, Global.WebPortal.ComponentCode); CtxVars.ComponentId = WiXSetup.GetComponentID(CfgPath, Global.WebPortal.ComponentCode);
if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId)) if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId))
{ {
AppConfig.LoadComponentSettings(CtxVars); AppConfig.LoadComponentSettings(CtxVars);
Ctx["COMPFOUND_PORTAL"] = "1";
SetProperty(Ctx, "COMPFOUND_PORTAL_ID", CtxVars.ComponentId);
SetProperty(Ctx, "COMPFOUND_PORTAL_MAIN_CFG", CfgPath);
SetProperty(Ctx, "PI_PORTAL_IP", CtxVars.WebSiteIP); SetProperty(Ctx, "PI_PORTAL_IP", CtxVars.WebSiteIP);
SetProperty(Ctx, "PI_PORTAL_PORT", CtxVars.WebSitePort); SetProperty(Ctx, "PI_PORTAL_PORT", CtxVars.WebSitePort);
SetProperty(Ctx, "PI_PORTAL_HOST", CtxVars.WebSiteDomain); SetProperty(Ctx, "PI_PORTAL_HOST", CtxVars.WebSiteDomain);
SetProperty(Ctx, "PI_PORTAL_LOGIN", CtxVars.UserAccount); SetProperty(Ctx, "PI_PORTAL_LOGIN", CtxVars.UserAccount);
SetProperty(Ctx, "PI_PORTAL_PASSWORD", CtxVars.UserPassword);
SetProperty(Ctx, "PI_PORTAL_PASSWORD_CONFIRM", CtxVars.UserPassword);
SetProperty(Ctx, "PI_PORTAL_DOMAIN", CtxVars.UserDomain); SetProperty(Ctx, "PI_PORTAL_DOMAIN", CtxVars.UserDomain);
if (!SetProperty(Ctx, "PI_ESERVER_URL", CtxVars.EnterpriseServerURL)) if (!SetProperty(Ctx, "PI_ESERVER_URL", CtxVars.EnterpriseServerURL))
if (!SetProperty(Ctx, "PI_ESERVER_URL", EServerUrl)) if (!SetProperty(Ctx, "PI_ESERVER_URL", EServerUrl))
SetProperty(Ctx, "PI_ESERVER_URL", Global.WebPortal.DefaultEntServURL); SetProperty(Ctx, "PI_ESERVER_URL", Global.WebPortal.DefaultEntServURL);
SetProperty(Ctx, "PI_PORTAL_INSTALL_DIR", CtxVars.InstallFolder);
SetProperty(Ctx, "WSP_INSTALL_DIR", Directory.GetParent(CtxVars.InstallFolder).FullName);
var HaveAccount = SecurityUtils.UserExists(CtxVars.UserDomain, CtxVars.UserAccount);
bool HavePool = Tool.AppPoolExists(CtxVars.ApplicationPool);
Ctx["COMPFOUND_PORTAL"] = (HaveAccount && HavePool) ? YesNo.Yes : YesNo.No;
} }
} }
TryApllyNewPassword(Ctx, "PI_SERVER_PASSWORD"); TryApllyNewPassword(Ctx, "PI_SERVER_PASSWORD");
@ -202,8 +280,8 @@ namespace WebsitePanel.WIXInstaller
try try
{ {
Log.WriteStart("InstallWebFeatures"); Log.WriteStart("InstallWebFeatures");
if(Tool.GetIsWebRoleInstalled()) if (Tool.GetIsWebRoleInstalled())
{ {
if (!Tool.GetIsWebFeaturesInstalled()) if (!Tool.GetIsWebFeaturesInstalled())
{ {
Log.WriteInfo("InstallWebFeatures: ASP.NET."); Log.WriteInfo("InstallWebFeatures: ASP.NET.");
@ -221,12 +299,12 @@ namespace WebsitePanel.WIXInstaller
} }
Log.WriteInfo("InstallWebFeatures: done."); Log.WriteInfo("InstallWebFeatures: done.");
} }
catch(Exception ex) catch (Exception ex)
{ {
Log.WriteError(string.Format("InstallWebFeatures: fail - {0}.", ex.ToString())); Log.WriteError(string.Format("InstallWebFeatures: fail - {0}.", ex.ToString()));
Result = ActionResult.Failure; Result = ActionResult.Failure;
} }
if(!string.IsNullOrWhiteSpace(Msg)) if (!string.IsNullOrWhiteSpace(Msg))
Log.WriteInfo(string.Format("InstallWebFeatures Tool Log: {0}.", Msg)); Log.WriteInfo(string.Format("InstallWebFeatures Tool Log: {0}.", Msg));
Log.WriteEnd("InstallWebFeatures"); Log.WriteEnd("InstallWebFeatures");
return Result; return Result;
@ -418,7 +496,7 @@ namespace WebsitePanel.WIXInstaller
foreach (var Db in GetDbList(ConnStr: session["DB_CONN"], ForbiddenNames: SysDb)) foreach (var Db in GetDbList(ConnStr: session["DB_CONN"], ForbiddenNames: SysDb))
{ {
Ctrl.AddItem(Db); Ctrl.AddItem(Db);
session["DB_SELECT"] = Db; // Adds available DBs to installer log. session["DB_SELECT"] = Db; // Adds available DBs to installer log and selects latest.
} }
else else
session["DB_SELECT"] = ""; session["DB_SELECT"] = "";
@ -427,88 +505,15 @@ namespace WebsitePanel.WIXInstaller
[CustomAction] [CustomAction]
public static ActionResult CheckConnectionUI(Session session) public static ActionResult CheckConnectionUI(Session session)
{ {
string ConnStr = session["DB_AUTH"].Equals("Windows Authentication") ? GetConnectionString(session["DB_SERVER"], "master") : string ConnStr = session["DB_AUTH"].Equals(SQL_AUTH_WINDOWS) ? GetConnectionString(session["DB_SERVER"], "master") :
GetConnectionString(session["DB_SERVER"], "master", session["DB_LOGIN"], session["DB_PASSWORD"]); GetConnectionString(session["DB_SERVER"], "master", session["DB_LOGIN"], session["DB_PASSWORD"]);
string msg; string msg;
bool Result = CheckConnection(ConnStr, out msg); bool Result = CheckConnection(ConnStr, out msg);
session["DB_CONN_CORRECT"] = Result ? "1" : "0"; session["DB_CONN_CORRECT"] = Result ? YesNo.Yes : YesNo.No;
session["DB_CONN"] = Result ? ConnStr : ""; session["DB_CONN"] = Result ? ConnStr : "";
session["DB_CONN_MSG"] = msg; session["DB_CONN_MSG"] = msg;
return ActionResult.Success; return ActionResult.Success;
} }
[CustomAction]
public static ActionResult FinalizeInstall(Session session)
{
/*var connectionString = GetCustomActionProperty(session, "ConnectionString").Replace(CustomDataDelimiter, ";");
var serviceFolder = GetCustomActionProperty(session, "ServiceFolder");
var previousConnectionString = GetCustomActionProperty(session, "PreviousConnectionString").Replace(CustomDataDelimiter, ";");
var previousCryptoKey = GetCustomActionProperty(session, "PreviousCryptoKey");
if (string.IsNullOrEmpty(serviceFolder))
{
return ActionResult.Success;
}
connectionString = string.IsNullOrEmpty(previousConnectionString)
? connectionString
: previousConnectionString;
ChangeConfigString("/configuration/connectionStrings/add[@name='EnterpriseServer']", "connectionString", connectionString, serviceFolder);
ChangeConfigString("/configuration/appSettings/add[@key='WebsitePanel.CryptoKey']", "value", previousCryptoKey, serviceFolder);
InstallService(serviceFolder);*/
return ActionResult.Success;
}
[CustomAction]
public static ActionResult FinalizeUnInstall(Session session)
{
// UnInstallService();
return ActionResult.Success;
}
[CustomAction]
public static ActionResult PreInstallationAction(Session session)
{
session["SKIPCONNECTIONSTRINGSTEP"] = "0";
session["SERVICEFOLDER"] = session["INSTALLFOLDER"];
var servicePath = /*SecurityUtils.GetServicePath("WebsitePanel Scheduler")*/"";
if (!string.IsNullOrEmpty(servicePath))
{
string path = Path.Combine(servicePath, "WebsitePanel.SchedulerService.exe.config");
if (File.Exists(path))
{
using (var reader = new StreamReader(path))
{
string content = reader.ReadToEnd();
var pattern = new Regex(@"(?<=<add key=""WebsitePanel.CryptoKey"" .*?value\s*=\s*"")[^""]+(?="".*?>)");
Match match = pattern.Match(content);
session["PREVIOUSCRYPTOKEY"] = match.Value;
var connectionStringPattern = new Regex(@"(?<=<add name=""EnterpriseServer"" .*?connectionString\s*=\s*"")[^""]+(?="".*?>)");
match = connectionStringPattern.Match(content);
session["PREVIOUSCONNECTIONSTRING"] = match.Value.Replace(";", CustomDataDelimiter);
}
session["SKIPCONNECTIONSTRINGSTEP"] = "1";
if (string.IsNullOrEmpty(session["SERVICEFOLDER"]))
{
session["SERVICEFOLDER"] = servicePath;
}
}
}
return ActionResult.Success;
}
[CustomAction] [CustomAction]
public static ActionResult PrereqCheck(Session session) public static ActionResult PrereqCheck(Session session)
{ {
@ -556,102 +561,14 @@ namespace WebsitePanel.WIXInstaller
} }
#endregion #endregion
private static void InstallService(string installFolder)
{
try
{
var schedulerService =
ServiceController.GetServices().FirstOrDefault(
s => s.DisplayName.Equals("WebsitePanel Scheduler", StringComparison.CurrentCultureIgnoreCase));
if (schedulerService != null)
{
StopService(schedulerService.ServiceName);
SecurityUtils.DeleteService(schedulerService.ServiceName);
}
ManagedInstallerClass.InstallHelper(new[] { "/i", Path.Combine(installFolder, "WebsitePanel.SchedulerService.exe") });
StartService("WebsitePanel Scheduler");
}
catch (Exception)
{
}
}
private static void UnInstallService()
{
try
{
var schedulerService =
ServiceController.GetServices().FirstOrDefault(
s => s.DisplayName.Equals("WebsitePanel Scheduler", StringComparison.CurrentCultureIgnoreCase));
if (schedulerService != null)
{
StopService(schedulerService.ServiceName);
SecurityUtils.DeleteService(schedulerService.ServiceName);
}
}
catch (Exception)
{
}
}
private static void ChangeConfigString(string nodePath, string attrToChange, string value, string installFolder)
{
string path = Path.Combine(installFolder, "WebsitePanel.SchedulerService.exe.config");
if (!File.Exists(path))
{
return;
}
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(path);
XmlElement node = xmldoc.SelectSingleNode(nodePath) as XmlElement;
if (node != null)
{
node.SetAttribute(attrToChange, value);
xmldoc.Save(path);
}
}
private static void StopService(string serviceName)
{
var sc = new ServiceController(serviceName);
if (sc.Status == ServiceControllerStatus.Running)
{
sc.Stop();
sc.WaitForStatus(ServiceControllerStatus.Stopped);
}
}
private static void StartService(string serviceName)
{
var sc = new ServiceController(serviceName);
if (sc.Status == ServiceControllerStatus.Stopped)
{
sc.Start();
sc.WaitForStatus(ServiceControllerStatus.Running);
}
}
private static string GetConnectionString(string serverName, string databaseName) private static string GetConnectionString(string serverName, string databaseName)
{ {
return string.Format("Server={0};database={1};Trusted_Connection=true;", serverName, databaseName)/*.Replace(";", CustomDataDelimiter)*/; return string.Format("Server={0};database={1};Trusted_Connection=true;", serverName, databaseName);
} }
private static string GetConnectionString(string serverName, string databaseName, string login, string password) private static string GetConnectionString(string serverName, string databaseName, string login, string password)
{ {
return string.Format("Server={0};database={1};uid={2};password={3};", serverName, databaseName, login, password)/*.Replace(";", CustomDataDelimiter)*/; return string.Format("Server={0};database={1};uid={2};password={3};", serverName, databaseName, login, password);
} }
static bool CheckConnection(string ConnStr, out string Info) static bool CheckConnection(string ConnStr, out string Info)
{ {
@ -671,16 +588,6 @@ namespace WebsitePanel.WIXInstaller
} }
return Result; return Result;
} }
private static string GetCustomActionProperty(Session session, string key)
{
if (session.CustomActionData.ContainsKey(key))
{
return session.CustomActionData[key].Replace("-=-", ";");
}
return string.Empty;
}
private static void AddCheck(ListViewCtrl view, Session session, string PropertyID) private static void AddCheck(ListViewCtrl view, Session session, string PropertyID)
{ {
view.AddItem(session[PropertyID] == YesNo.Yes, session[PropertyID + "_TITLE"]); view.AddItem(session[PropertyID] == YesNo.Yes, session[PropertyID + "_TITLE"]);
@ -834,15 +741,6 @@ namespace WebsitePanel.WIXInstaller
foreach (var Msg in Msgs) foreach (var Msg in Msgs)
AddTo(Ctx, "CUSTOM_INSTALL_TEXT", Msg); ; AddTo(Ctx, "CUSTOM_INSTALL_TEXT", Msg); ;
} }
internal static string GetProperty(Session Ctx, string Property)
{
if (Ctx.CustomActionData.ContainsKey(Property))
return Ctx[Property];
else
return string.Empty;
}
private static ActionResult ProcessInstall(Session Ctx, WiXInstallType InstallType) private static ActionResult ProcessInstall(Session Ctx, WiXInstallType InstallType)
{ {
IWiXSetup Install = null; IWiXSetup Install = null;
@ -911,6 +809,39 @@ namespace WebsitePanel.WIXInstaller
Log.WriteInfo("New password was applied to " + Id); Log.WriteInfo("New password was applied to " + Id);
} }
} }
private static string GetProperty(Session Ctx, string Property)
{
if (Ctx.CustomActionData.ContainsKey(Property))
return Ctx.CustomActionData[Property];
else
return string.Empty;
}
private static bool SetProperty(Session CtxSession, string Prop, string Value)
{
if (!string.IsNullOrWhiteSpace(Value))
{
CtxSession[Prop] = Value;
return true;
}
return false;
}
private static SetupScript GetPrepareScript(Session Ctx)
{
var CtxVars = new SetupVariables();
WiXSetup.FillFromSession(Ctx.CustomActionData, CtxVars);
AppConfig.LoadConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = GetProperty(Ctx, "MainConfig") });
CtxVars.IISVersion = Tool.GetWebServerVersion();
CtxVars.ComponentId = GetProperty(Ctx, "ComponentId");
CtxVars.Version = AppConfig.GetComponentSettingStringValue(CtxVars.ComponentId, Global.Parameters.Release);
CtxVars.SpecialBaseDirectory = Directory.GetParent(GetProperty(Ctx, "MainConfig")).FullName;
CtxVars.FileNameMap = new Dictionary<string, string>();
CtxVars.FileNameMap.Add(new FileInfo(GetProperty(Ctx, "MainConfig")).Name, BackupRestore.MainConfig);
SetupScript Result = new ExpressScript(CtxVars);
Result.Actions.Add(new InstallAction(ActionTypes.StopApplicationPool) { SetupVariables = CtxVars });
Result.Actions.Add(new InstallAction(ActionTypes.Backup) { SetupVariables = CtxVars });
Result.Actions.Add(new InstallAction(ActionTypes.DeleteDirectory) { SetupVariables = CtxVars, Path = CtxVars.InstallFolder });
return Result;
}
} }
public static class SessionExtension public static class SessionExtension
{ {

View file

@ -91,7 +91,7 @@ namespace WebsitePanel.VmConfig
} }
attempts++; attempts++;
Log.WriteError(string.Format("Attempt #{0} to find network adapter failed!", attempts)); Log.WriteError(string.Format("Attempt #{0} to find network adapter (mac: {1}) failed!", attempts, macAddress));
// wait 1 min // wait 1 min
System.Threading.Thread.Sleep(60000); System.Threading.Thread.Sleep(60000);
//repeat loop //repeat loop

View file

@ -6,7 +6,7 @@
<appSettings> <appSettings>
<!-- Start-up delay in milliseconds - time to wait before tasks execution --> <!-- Start-up delay in milliseconds - time to wait before tasks execution -->
<add key="Service.StartupDelay" value="0"/> <add key="Service.StartupDelay" value="20000"/>
<!-- Interval in milliseconds to poll registry keys. 1 - read registry only once --> <!-- Interval in milliseconds to poll registry keys. 1 - read registry only once -->
<add key="Service.RegistryPollInterval" value="30000"/> <add key="Service.RegistryPollInterval" value="30000"/>

View file

@ -12216,7 +12216,7 @@ SET @columnFullName = 'FullName'
DECLARE @curUsers cursor DECLARE @curUsers cursor
DECLARE @curSpace cursor DECLARE @curSpace cursor
DECLARE @sqlSpace nvarchar(2000) DECLARE @sqlSpace nvarchar(3000)
DECLARE @sqlUsers nvarchar(2000) DECLARE @sqlUsers nvarchar(2000)
DECLARE @sqlReturn nvarchar(4000) DECLARE @sqlReturn nvarchar(4000)
@ -12232,12 +12232,8 @@ DECLARE @Users TABLE
UserID int UserID int
) )
INSERT INTO @Users (UserID) INSERT INTO @Users (UserID)
SELECT ' SELECT
U.UserID
IF @OnlyFind = 1
SET @sqlUsers = @sqlUsers + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlUsers = @sqlUsers + 'U.UserID
FROM UsersDetailed AS U FROM UsersDetailed AS U
WHERE WHERE
U.UserID <> @UserID AND U.IsPeer = 0 AND U.UserID <> @UserID AND U.IsPeer = 0 AND
@ -12249,8 +12245,12 @@ WHERE
AND ((@RoleID = 0) OR (@RoleID > 0 AND U.RoleID = @RoleID)) AND ((@RoleID = 0) OR (@RoleID > 0 AND U.RoleID = @RoleID))
AND @HasUserRights = 1 AND @HasUserRights = 1
SET @curValue = cursor local for SET @curValue = cursor local for
SELECT SELECT '
U.ItemID,
IF @OnlyFind = 1
SET @sqlUsers = @sqlUsers + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlUsers = @sqlUsers + 'U.ItemID,
U.TextSearch, U.TextSearch,
U.ColumnType, U.ColumnType,
''Users'' as FullType, ''Users'' as FullType,
@ -12274,8 +12274,10 @@ SELECT U3.UserID as ItemID, U3.FirstName + '' '' + U3.LastName as TextSearch, @c
FROM dbo.Users AS U3) as U FROM dbo.Users AS U3) as U
WHERE TextSearch<>'' '' OR ISNULL(TextSearch, 0) > 0 WHERE TextSearch<>'' '' OR ISNULL(TextSearch, 0) > 0
) )
AS U ON TU.UserID = U.ItemID AS U ON TU.UserID = U.ItemID'
ORDER BY TextSearch' IF @FilterValue <> ''
SET @sqlUsers = @sqlUsers + ' WHERE TextSearch LIKE ''' + @FilterValue + ''''
SET @sqlUsers = @sqlUsers + ' ORDER BY TextSearch'
SET @sqlUsers = @sqlUsers + ' open @curValue' SET @sqlUsers = @sqlUsers + ' open @curValue'
@ -12288,12 +12290,8 @@ SET @sqlSpace = '
ItemID int ItemID int
) )
INSERT INTO @ItemsService (ItemID) INSERT INTO @ItemsService (ItemID)
SELECT ' SELECT
SI.ItemID
IF @OnlyFind = 1
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlSpace = @sqlSpace + 'SI.ItemID
FROM ServiceItems AS SI FROM ServiceItems AS SI
INNER JOIN Packages AS P ON P.PackageID = SI.PackageID INNER JOIN Packages AS P ON P.PackageID = SI.PackageID
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
@ -12313,8 +12311,12 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID
dbo.CheckUserParent(@UserID, P.UserID) = 1 dbo.CheckUserParent(@UserID, P.UserID) = 1
SET @curValue = cursor local for SET @curValue = cursor local for
SELECT SELECT '
IF @OnlyFind = 1
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlSpace = @sqlSpace + '
SI.ItemID as ItemID, SI.ItemID as ItemID,
SI.ItemName as TextSearch, SI.ItemName as TextSearch,
STYPE.DisplayName as ColumnType, STYPE.DisplayName as ColumnType,
@ -12324,9 +12326,17 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID
FROM @ItemsService AS I FROM @ItemsService AS I
INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID
INNER JOIN ServiceItemTypes AS STYPE ON SI.ItemTypeID = STYPE.ItemTypeID INNER JOIN ServiceItemTypes AS STYPE ON SI.ItemTypeID = STYPE.ItemTypeID
WHERE STYPE.Searchable = 1 WHERE (STYPE.Searchable = 1)'
UNION IF @FilterValue <> ''
SELECT SET @sqlSpace = @sqlSpace + ' AND (SI.ItemName LIKE ''' + @FilterValue + ''')'
SET @sqlSpace = @sqlSpace + '
UNION (
SELECT '
IF @OnlyFind = 1
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlSpace = @sqlSpace + '
D.DomainID AS ItemID, D.DomainID AS ItemID,
D.DomainName as TextSearch, D.DomainName as TextSearch,
''Domain'' as ColumnType, ''Domain'' as ColumnType,
@ -12335,19 +12345,67 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID
0 as AccountID 0 as AccountID
FROM @ItemsDomain AS I FROM @ItemsDomain AS I
INNER JOIN Domains AS D ON I.ItemID = D.DomainID INNER JOIN Domains AS D ON I.ItemID = D.DomainID
WHERE D.IsDomainPointer=0 WHERE (D.IsDomainPointer=0)'
IF @FilterValue <> ''
SET @sqlSpace = @sqlSpace + ' AND (D.DomainName LIKE ''' + @FilterValue + ''')'
SET @sqlSpace = @sqlSpace + '
UNION UNION
SELECT SELECT '
IF @OnlyFind = 1
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlSpace = @sqlSpace + '
EA.ItemID AS ItemID, EA.ItemID AS ItemID,
EA.AccountName as TextSearch, EA.DisplayName as TextSearch,
''ExchangeAccount'' as ColumnType, ''ExchangeAccount'' as ColumnType,
''ExchangeAccountMailbox'' as FullType, ''ExchangeAccount'' as FullType,
SI2.PackageID as PackageID, SI2.PackageID as PackageID,
EA.AccountID as AccountID EA.AccountID as AccountID
FROM @ItemsService AS I2 FROM @ItemsService AS I2
INNER JOIN ServiceItems AS SI2 ON I2.ItemID = SI2.ItemID INNER JOIN ServiceItems AS SI2 ON I2.ItemID = SI2.ItemID
INNER JOIN ExchangeAccounts AS EA ON I2.ItemID = EA.ItemID INNER JOIN ExchangeAccounts AS EA ON I2.ItemID = EA.ItemID'
ORDER BY TextSearch'; IF @FilterValue <> ''
SET @sqlSpace = @sqlSpace + ' WHERE (EA.DisplayName LIKE ''' + @FilterValue + ''')'
SET @sqlSpace = @sqlSpace + '
UNION
SELECT '
IF @OnlyFind = 1
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlSpace = @sqlSpace + '
EA4.ItemID AS ItemID,
EA4.PrimaryEmailAddress as TextSearch,
''ExchangeAccount'' as ColumnType,
''ExchangeAccount'' as FullType,
SI4.PackageID as PackageID,
EA4.AccountID as AccountID
FROM @ItemsService AS I4
INNER JOIN ServiceItems AS SI4 ON I4.ItemID = SI4.ItemID
INNER JOIN ExchangeAccounts AS EA4 ON I4.ItemID = EA4.ItemID'
IF @FilterValue <> ''
SET @sqlSpace = @sqlSpace + ' WHERE (EA4.PrimaryEmailAddress LIKE ''' + @FilterValue + ''')'
SET @sqlSpace = @sqlSpace + '
UNION
SELECT '
IF @OnlyFind = 1
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlSpace = @sqlSpace + '
I3.ItemID AS ItemID,
EAEA.EmailAddress as TextSearch,
''ExchangeAccount'' as ColumnType,
''ExchangeAccount'' as FullType,
SI3.PackageID as PackageID,
0 as AccountID
FROM @ItemsService AS I3
INNER JOIN ServiceItems AS SI3 ON I3.ItemID = SI3.ItemID
INNER JOIN ExchangeAccountEmailAddresses AS EAEA ON I3.ItemID = EAEA.AccountID'
IF @FilterValue <> ''
SET @sqlSpace = @sqlSpace + ' WHERE (EAEA.EmailAddress LIKE ''' + @FilterValue + ''')'
SET @sqlSpace = @sqlSpace + ') ORDER BY TextSearch';
SET @sqlSpace = @sqlSpace + ' open @curValue' SET @sqlSpace = @sqlSpace + ' open @curValue'
@ -12411,9 +12469,6 @@ SET @sqlReturn = @sqlReturn + ' AND IA.ColumnType in ( ' + @ColType + ' ) ';
IF @FullType <> '' IF @FullType <> ''
SET @sqlReturn = @sqlReturn + ' AND IA.FullType = ''' + @FullType + ''''; SET @sqlReturn = @sqlReturn + ' AND IA.FullType = ''' + @FullType + '''';
IF @FilterValue <> ''
SET @sqlReturn = @sqlReturn + ' AND IA.' + @FilterColumn + ' LIKE @FilterValue '
SET @sqlReturn = @sqlReturn + ' SET @sqlReturn = @sqlReturn + '
SELECT COUNT(ItemID) FROM @ItemsReturn; SELECT COUNT(ItemID) FROM @ItemsReturn;
SELECT DISTINCT(ColumnType) FROM @ItemsReturn WHERE (1 = 1) '; SELECT DISTINCT(ColumnType) FROM @ItemsReturn WHERE (1 = 1) ';

View file

@ -44364,7 +44364,7 @@ Hello #user.FirstName#,
</p> </p>
<p> <p>
Please, find below details of your control panel account. Please, find below details of your control panel account. The one time password was generated for you. You should change the password after login.
</p> </p>
<h1>Control Panel URL</h1> <h1>Control Panel URL</h1>
@ -44373,7 +44373,7 @@ Please, find below details of your control panel account.
<tr> <tr>
<th>Control Panel URL</th> <th>Control Panel URL</th>
<th>Username</th> <th>Username</th>
<th>Password</th> <th>One Time Password</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -44411,11 +44411,11 @@ INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [Property
Hello #user.FirstName#, Hello #user.FirstName#,
Please, find below details of your control panel account. Please, find below details of your control panel account. The one time password was generated for you. You should change the password after login.
Control Panel URL: http://panel.AcmeHosting.com Control Panel URL: http://panel.AcmeHosting.com
Username: #user.Username# Username: #user.Username#
Password: #user.Password# One Time Password: #user.Password#
If you have any questions regarding your hosting account, feel free to contact our support department at any time. If you have any questions regarding your hosting account, feel free to contact our support department at any time.

File diff suppressed because it is too large Load diff

View file

@ -285,10 +285,22 @@ namespace WebsitePanel.Import.Enterprise
case "group": case "group":
if (child.Properties["mail"] != null) if (child.Properties["mail"] != null)
email = (string)child.Properties["mail"].Value; email = (string)child.Properties["mail"].Value;
if ((typeProp != null) && (typeProp.Value != null) && (1073741833 == (int)typeProp.Value))
bool isDistributionList = false;
if ((typeProp != null) && (typeProp.Value != null) && (1073741833 == (int)typeProp.Value))
isDistributionList = true;
if (typeDetails == 262144)
isDistributionList = true;
if (typeDetails == 0)
isDistributionList = true;
if (isDistributionList)
{ {
//Universal Security Group //Universal Security Group
type = "Mail-Enabled Universal Security Group"; type = "Distribution List";
//email //email
PropertyValueCollection proxyAddresses = child.Properties["proxyAddresses"]; PropertyValueCollection proxyAddresses = child.Properties["proxyAddresses"];
if (proxyAddresses != null) if (proxyAddresses != null)

View file

@ -141,6 +141,8 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback ImportCollectionOperationCompleted; private System.Threading.SendOrPostCallback ImportCollectionOperationCompleted;
private System.Threading.SendOrPostCallback GetRemoteDesktopServiceIdOperationCompleted;
/// <remarks/> /// <remarks/>
public esRemoteDesktopServices() { public esRemoteDesktopServices() {
this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx"; this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx";
@ -311,6 +313,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event ImportCollectionCompletedEventHandler ImportCollectionCompleted; public event ImportCollectionCompletedEventHandler ImportCollectionCompleted;
/// <remarks/>
public event GetRemoteDesktopServiceIdCompletedEventHandler GetRemoteDesktopServiceIdCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsCollection GetRdsCollection(int collectionId) { public RdsCollection GetRdsCollection(int collectionId) {
@ -2772,6 +2777,47 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRemoteDesktopServiceId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int GetRemoteDesktopServiceId(int itemId) {
object[] results = this.Invoke("GetRemoteDesktopServiceId", new object[] {
itemId});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRemoteDesktopServiceId(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRemoteDesktopServiceId", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public int EndGetRemoteDesktopServiceId(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void GetRemoteDesktopServiceIdAsync(int itemId) {
this.GetRemoteDesktopServiceIdAsync(itemId, null);
}
/// <remarks/>
public void GetRemoteDesktopServiceIdAsync(int itemId, object userState) {
if ((this.GetRemoteDesktopServiceIdOperationCompleted == null)) {
this.GetRemoteDesktopServiceIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRemoteDesktopServiceIdOperationCompleted);
}
this.InvokeAsync("GetRemoteDesktopServiceId", new object[] {
itemId}, this.GetRemoteDesktopServiceIdOperationCompleted, userState);
}
private void OnGetRemoteDesktopServiceIdOperationCompleted(object arg) {
if ((this.GetRemoteDesktopServiceIdCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRemoteDesktopServiceIdCompleted(this, new GetRemoteDesktopServiceIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -4207,4 +4253,30 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRemoteDesktopServiceIdCompletedEventHandler(object sender, GetRemoteDesktopServiceIdCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRemoteDesktopServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRemoteDesktopServiceIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
} }

View file

@ -56,6 +56,11 @@ namespace WebsitePanel.EnterpriseServer
} }
public static int GetRemoteDesktopServiceId(int itemId)
{
return GetRdsServiceId(itemId);
}
public static RdsCollection GetRdsCollection(int collectionId) public static RdsCollection GetRdsCollection(int collectionId)
{ {
return GetRdsCollectionInternal(collectionId); return GetRdsCollectionInternal(collectionId);

View file

@ -392,5 +392,11 @@ namespace WebsitePanel.EnterpriseServer
{ {
return RemoteDesktopServicesController.ImportCollection(itemId, collectionName); return RemoteDesktopServicesController.ImportCollection(itemId, collectionName);
} }
[WebMethod]
public int GetRemoteDesktopServiceId(int itemId)
{
return RemoteDesktopServicesController.GetRemoteDesktopServiceId(itemId);
}
} }
} }

View file

@ -48,7 +48,7 @@ namespace WebsitePanel.EnterpriseServer.Base.RDS
public const string DISABLE_CMD = "DisableCMD"; public const string DISABLE_CMD = "DisableCMD";
public const string DISABLE_CMD_ADMINISTRATORS = "DisableCMDAdministrators"; public const string DISABLE_CMD_ADMINISTRATORS = "DisableCMDAdministrators";
public const string DISABLE_CMD_USERS = "DisableCMDUsers"; public const string DISABLE_CMD_USERS = "DisableCMDUsers";
public const string ALLOWCONNECTIONSIMPORT = "AllowConnectionsImport"; public const string ALLOWCOLLECTIONSIMPORT = "AllowCollectionsImport";
public string SettingsName { get; set; } public string SettingsName { get; set; }
public int ServerId { get; set; } public int ServerId { get; set; }

View file

@ -228,21 +228,31 @@ namespace WebsitePanel.Providers.Virtualization
try try
{ {
Command cmd = new Command("Get-VM"); HostedSolutionLog.LogInfo("Before Get-VM command");
Command cmd = new Command("Get-VM");
Collection<PSObject> result = PowerShell.Execute(cmd, true); Collection<PSObject> result = PowerShell.Execute(cmd, true);
HostedSolutionLog.LogInfo("After Get-VM command");
foreach (PSObject current in result) foreach (PSObject current in result)
{ {
VirtualMachine vm = new VirtualMachine HostedSolutionLog.LogInfo("- start VM -");
{ var vm = new VirtualMachine();
VirtualMachineId = current.GetProperty("Id").ToString(), HostedSolutionLog.LogInfo("create");
Name = current.GetString("Name"), vm.VirtualMachineId = current.GetProperty("Id").ToString();
State = current.GetEnum<VirtualMachineState>("State"), HostedSolutionLog.LogInfo("VirtualMachineId {0}", vm.VirtualMachineId);
Uptime = Convert.ToInt64(current.GetProperty<TimeSpan>("UpTime").TotalMilliseconds), vm.Name = current.GetString("Name");
ReplicationState = current.GetEnum<ReplicationState>("ReplicationState") HostedSolutionLog.LogInfo("Name {0}", vm.Name);
}; vm.State = current.GetEnum<VirtualMachineState>("State");
HostedSolutionLog.LogInfo("State {0}", vm.State);
vm.Uptime = Convert.ToInt64(current.GetProperty<TimeSpan>("UpTime").TotalMilliseconds);
HostedSolutionLog.LogInfo("Uptime {0}", vm.Uptime);
vm.ReplicationState = current.GetEnum<ReplicationState>("ReplicationState");
HostedSolutionLog.LogInfo("ReplicationState {0}", vm.ReplicationState);
vmachines.Add(vm); vmachines.Add(vm);
HostedSolutionLog.LogInfo("- end VM -");
} }
HostedSolutionLog.LogInfo("Finish");
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -430,7 +430,7 @@ namespace WebsitePanel.WebDavPortal.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Initials. /// Looks up a localized string similar to Middle Initial.
/// </summary> /// </summary>
public static string Initials { public static string Initials {
get { get {

View file

@ -235,7 +235,7 @@
<value>Info</value> <value>Info</value>
</data> </data>
<data name="Initials" xml:space="preserve"> <data name="Initials" xml:space="preserve">
<value>Initials</value> <value>Middle Initial</value>
</data> </data>
<data name="ItemExist" xml:space="preserve"> <data name="ItemExist" xml:space="preserve">
<value>File already exist</value> <value>File already exist</value>

View file

@ -4368,6 +4368,12 @@
<data name="ServiceItemType.VirtualSwitch" xml:space="preserve"> <data name="ServiceItemType.VirtualSwitch" xml:space="preserve">
<value>Virtual Switch</value> <value>Virtual Switch</value>
</data> </data>
<data name="ServiceItemType.SharePointFoundationSiteCollection" xml:space="preserve">
<value>SharePoint Foundation Site Collection</value>
</data>
<data name="ServiceItemType.SharePointEnterpriseSiteCollection" xml:space="preserve">
<value>SharePoint Enterprise Site Collection</value>
</data>
<data name="TaskActivity.VPS_ADD_EXTERNAL_IP" xml:space="preserve"> <data name="TaskActivity.VPS_ADD_EXTERNAL_IP" xml:space="preserve">
<value>Assigning external IP addresses</value> <value>Assigning external IP addresses</value>
</data> </data>
@ -5292,9 +5298,6 @@
<data name="UserItemType.ExchangeAccount" xml:space="preserve"> <data name="UserItemType.ExchangeAccount" xml:space="preserve">
<value>Exchange Account</value> <value>Exchange Account</value>
</data> </data>
<data name="UserItemType.ExchangeAccountMailbox" xml:space="preserve">
<value>Exchange Mailbox</value>
</data>
<data name="UserItemType.Users" xml:space="preserve"> <data name="UserItemType.Users" xml:space="preserve">
<value>Account Home</value> <value>Account Home</value>
</data> </data>

View file

@ -379,4 +379,75 @@ p.warningText {font-size:14px; color:Red; text-align:center;}
} }
.ui-menu-item:hover { .ui-menu-item:hover {
background-color: #f0f0f0; background-color: #f0f0f0;
}
.tip-bluesimple {
z-index:1000;
text-align:left;
border:1px solid #5e86aa;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
min-width:50px;
max-width:300px;
color:#333;
background-color:#ffffff;
/**
* - If you set a background-image, border/padding/background-color will be ingnored.
* You can set any padding to .tip-inner instead if you need.
* - If you want a tiled background-image and border/padding for the tip,
* set the background-image to .tip-inner instead.
*/
}
.tip-bluesimple .tip-inner {
font:12px/16px arial,helvetica,sans-serif;
}
/* Configure an arrow image - the script will automatically position it on the correct side of the tip */
.tip-bluesimple .tip-arrow-top {
margin-top:-6px;
margin-left:-5px; /* approx. half the width to center it */
top:0;
left:50%;
width:9px;
height:6px;
}
.tip-bluesimple .tip-arrow-right {
margin-top:-4px; /* approx. half the height to center it */
margin-left:0;
top:50%;
left:100%;
width:6px;
height:9px;
}
.tip-bluesimple .tip-arrow-bottom {
margin-top:0;
margin-left:-5px; /* approx. half the width to center it */
top:100%;
left:50%;
width:9px;
height:6px;
}
.tip-bluesimple .tip-arrow-left {
margin-top:-3px; /* approx. half the height to center it */
margin-left:-6px;
top:50%;
left:0;
width:6px;
height:9px;
}
.popover-title {
padding: 8px 14px;
margin: 0 !important;
font-size: 14px;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
border-radius: 5px 5px 0 0;
}
.popover-content {
padding:6px 8px;
} }

View file

@ -163,7 +163,7 @@
<value>Home Phone:</value> <value>Home Phone:</value>
</data> </data>
<data name="locInitials.Text" xml:space="preserve"> <data name="locInitials.Text" xml:space="preserve">
<value>Initials:</value> <value>Middle Initial:</value>
</data> </data>
<data name="locJobTitle.Text" xml:space="preserve"> <data name="locJobTitle.Text" xml:space="preserve">
<value>Job Title:</value> <value>Job Title:</value>

View file

@ -157,7 +157,7 @@
<value>Home Phone:</value> <value>Home Phone:</value>
</data> </data>
<data name="locInitials.Text" xml:space="preserve"> <data name="locInitials.Text" xml:space="preserve">
<value>Initials:</value> <value>Middle Initial:</value>
</data> </data>
<data name="locJobTitle.Text" xml:space="preserve"> <data name="locJobTitle.Text" xml:space="preserve">
<value>Job Title:</value> <value>Job Title:</value>

View file

@ -166,7 +166,7 @@
<value>Home Phone:</value> <value>Home Phone:</value>
</data> </data>
<data name="locInitials.Text" xml:space="preserve"> <data name="locInitials.Text" xml:space="preserve">
<value>Initials:</value> <value>Middle Initial:</value>
</data> </data>
<data name="locJobTitle.Text" xml:space="preserve"> <data name="locJobTitle.Text" xml:space="preserve">
<value>Job Title:</value> <value>Job Title:</value>

View file

@ -61,7 +61,7 @@
<td> <td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100"></asp:TextBox> <asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100"></asp:TextBox>
&nbsp; &nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" /> <asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Middle Initial:" />
<asp:TextBox ID="txtInitials" runat="server" CssClass="TextBox100"></asp:TextBox> <asp:TextBox ID="txtInitials" runat="server" CssClass="TextBox100"></asp:TextBox>
</td> </td>
</tr> </tr>

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View file

@ -73,7 +73,7 @@
<td> <td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox> <asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
&nbsp; &nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" /> <asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Middle Initial:" />
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox> <asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
</td> </td>
</tr> </tr>

View file

@ -47,7 +47,7 @@
<td> <td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox> <asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
&nbsp; &nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" /> <asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Middle Initial:" />
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox> <asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
</td> </td>
</tr> </tr>

View file

@ -77,7 +77,7 @@
<td> <td>
<asp:label ID="lblFirstName" runat="server"></asp:label> <asp:label ID="lblFirstName" runat="server"></asp:label>
&nbsp; &nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" /> <asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Middle Initial:" />
<asp:Label ID="lblInitials" runat="server"></asp:Label> <asp:Label ID="lblInitials" runat="server"></asp:Label>
</td> </td>
</tr> </tr>

View file

@ -95,7 +95,7 @@
<td> <td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100"></asp:TextBox> <asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100"></asp:TextBox>
&nbsp; &nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" /> <asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Middle Initial:" />
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100"></asp:TextBox> <asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100"></asp:TextBox>
</td> </td>
</tr> </tr>
@ -294,4 +294,5 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -147,4 +147,7 @@
<data name="lblComputersRootOU.Text" xml:space="preserve"> <data name="lblComputersRootOU.Text" xml:space="preserve">
<value>Computers Root OU:</value> <value>Computers Root OU:</value>
</data> </data>
<data name="cbCollectionsImport.Text" xml:space="preserve">
<value>Allow Collections Import</value>
</data>
</root> </root>

View file

@ -57,7 +57,12 @@
</asp:Panel> </asp:Panel>
</fieldset> </fieldset>
<fieldset> <fieldset>
<table> <table>
<tr>
<td colspan="2">
<asp:CheckBox runat="server" Text="Allow Collections Import" ID="cbCollectionsImport" meta:resourcekey="cbCollectionsImport" Checked="false" />
</td>
</tr>
<tr> <tr>
<td class="SubHead" width="200" nowrap> <td class="SubHead" width="200" nowrap>
<asp:Label runat="server" ID="lblConnectionBroker" meta:resourcekey="lblConnectionBroker" Text="Connection Broker:"/> <asp:Label runat="server" ID="lblConnectionBroker" meta:resourcekey="lblConnectionBroker" Text="Connection Broker:"/>

View file

@ -32,13 +32,14 @@ using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer; using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.RDS;
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Providers.RemoteDesktopServices;
namespace WebsitePanel.Portal.ProviderControls namespace WebsitePanel.Portal.ProviderControls
{ {
public partial class RDS_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings public partial class RDS_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
FillCertificateInfo(); FillCertificateInfo();
@ -98,6 +99,11 @@ namespace WebsitePanel.Portal.ProviderControls
txtCentralNPS.Enabled = false; txtCentralNPS.Enabled = false;
txtCentralNPS.Text = string.Empty; txtCentralNPS.Text = string.Empty;
} }
if (!string.IsNullOrEmpty(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]))
{
cbCollectionsImport.Checked = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]);
}
} }
public void SaveSettings(System.Collections.Specialized.StringDictionary settings) public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
@ -108,6 +114,7 @@ namespace WebsitePanel.Portal.ProviderControls
settings["PrimaryDomainController"] = txtPrimaryDomainController.Text; settings["PrimaryDomainController"] = txtPrimaryDomainController.Text;
settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString(); settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString();
settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty; settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT] = cbCollectionsImport.Checked.ToString();
settings["GWServrsList"] = GWServers; settings["GWServrsList"] = GWServers;

View file

@ -84,6 +84,15 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblExpiryDate; protected global::System.Web.UI.WebControls.Label lblExpiryDate;
/// <summary>
/// cbCollectionsImport control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbCollectionsImport;
/// <summary> /// <summary>
/// lblConnectionBroker control. /// lblConnectionBroker control.
/// </summary> /// </summary>

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System; using System;
using System.Collections.Specialized;
using System.Linq; using System.Linq;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer; using WebsitePanel.EnterpriseServer;
@ -55,8 +56,10 @@ namespace WebsitePanel.Portal.RDS
btnAddCollection.Enabled = (!(cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue <= gvRDSCollections.Rows.Count) || (cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue == -1)); btnAddCollection.Enabled = (!(cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue <= gvRDSCollections.Rows.Count) || (cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue == -1));
} }
var defaultSettings = ES.Services.Users.GetUserSettings(PanelSecurity.EffectiveUserId, UserSettings.RDS_POLICY); var serviceId = ES.Services.RDS.GetRemoteDesktopServiceId(PanelRequest.ItemID);
var allowImport = Convert.ToBoolean(defaultSettings[RdsServerSettings.ALLOWCONNECTIONSIMPORT]); var settings = ConvertArrayToDictionary(ES.Services.Servers.GetServiceSettings(serviceId));
var allowImport = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]);
if (!allowImport) if (!allowImport)
{ {
@ -64,6 +67,8 @@ namespace WebsitePanel.Portal.RDS
} }
} }
private void BindQuota(PackageContext cntx) private void BindQuota(PackageContext cntx)
{ {
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID); OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
@ -142,5 +147,16 @@ namespace WebsitePanel.Portal.RDS
{ {
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID); return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID);
} }
private StringDictionary ConvertArrayToDictionary(string[] settings)
{
StringDictionary r = new StringDictionary();
foreach (string setting in settings)
{
int idx = setting.IndexOf('=');
r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
}
return r;
}
} }
} }

View file

@ -181,14 +181,3 @@
</table> </table>
<br /> <br />
</asp:Panel> </asp:Panel>
<wsp:CollapsiblePanel id="secAllowImport" runat="server" TargetControlID="allowImportPanel" meta:resourcekey="secAllowImport" Text="Connections Import"/>
<asp:Panel ID="allowImportPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbAllowImport" meta:resourcekey="cbAllowImport" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>

View file

@ -52,8 +52,7 @@ namespace WebsitePanel.Portal
cbDisableCmdAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS]); cbDisableCmdAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS]);
cbDisableCmdUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_USERS]); cbDisableCmdUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_USERS]);
ddTreshold.SelectedValue = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE]; ddTreshold.SelectedValue = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE];
cbAllowImport.Checked = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCONNECTIONSIMPORT]);
} }
public void SaveSettings(UserSettings settings) public void SaveSettings(UserSettings settings)
@ -81,8 +80,7 @@ namespace WebsitePanel.Portal
settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_ADMINISTRATORS] = cbControlSessionAdministrators.Checked.ToString(); settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_ADMINISTRATORS] = cbControlSessionAdministrators.Checked.ToString();
settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_Users] = cbControlSessionUsers.Checked.ToString(); settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_Users] = cbControlSessionUsers.Checked.ToString();
settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS] = cbDisableCmdAdministrators.Checked.ToString(); settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS] = cbDisableCmdAdministrators.Checked.ToString();
settings[RdsServerSettings.DISABLE_CMD_USERS] = cbDisableCmdUsers.Checked.ToString(); settings[RdsServerSettings.DISABLE_CMD_USERS] = cbDisableCmdUsers.Checked.ToString();
settings[RdsServerSettings.ALLOWCONNECTIONSIMPORT] = cbAllowImport.Checked.ToString();
} }
} }
} }

View file

@ -443,32 +443,5 @@ namespace WebsitePanel.Portal {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbDisableCmdAdministrators; protected global::System.Web.UI.WebControls.CheckBox cbDisableCmdAdministrators;
/// <summary>
/// secAllowImport control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secAllowImport;
/// <summary>
/// allowImportPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel allowImportPanel;
/// <summary>
/// cbAllowImport control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbAllowImport;
} }
} }

View file

@ -50,7 +50,7 @@
$ImgBtn.attr('disabled', 'disabled'); $ImgBtn.attr('disabled', 'disabled');
} }
}); });
if (document.referrer.search("pid=Login") > 0) { if (document.referrer.search("pid=Login") > 0 || window.location.href.search("pid=SearchObject") > 0) {
$("#<%= tbSearch.ClientID %>").focus(); $("#<%= tbSearch.ClientID %>").focus();
} }

View file

@ -48,7 +48,6 @@ namespace WebsitePanel.Portal.SkinControls
const string TYPE_DOMAIN = "Domain"; const string TYPE_DOMAIN = "Domain";
const string TYPE_ORGANIZATION = "Organization"; const string TYPE_ORGANIZATION = "Organization";
const string TYPE_EXCHANGEACCOUNT = "ExchangeAccount"; const string TYPE_EXCHANGEACCOUNT = "ExchangeAccount";
const string TYPE_EXCHANGEACCOUNT_MAILBOX = "ExchangeAccountMailbox";
const string PID_SPACE_WEBSITES = "SpaceWebSites"; const string PID_SPACE_WEBSITES = "SpaceWebSites";
const string PID_SPACE_DIMAINS = "SpaceDomains"; const string PID_SPACE_DIMAINS = "SpaceDomains";
const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer"; const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer";
@ -151,12 +150,6 @@ namespace WebsitePanel.Portal.SkinControls
"moduleDefId=ExchangeServer"); "moduleDefId=ExchangeServer");
break; break;
case TYPE_EXCHANGEACCOUNT: case TYPE_EXCHANGEACCOUNT:
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_user",//"mid="+this.ModuleID.ToString(),
"AccountID="+this.tbAccountId.Text,"Context=User",
"moduleDefId=ExchangeServer");
break;
case TYPE_EXCHANGEACCOUNT_MAILBOX:
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(), res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_user",//"mid="+this.ModuleID.ToString(), PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_user",//"mid="+this.ModuleID.ToString(),
"AccountID=" + this.tbAccountId.Text, "Context=Mailbox", "AccountID=" + this.tbAccountId.Text, "Context=Mailbox",

View file

@ -9,7 +9,8 @@
<asp:HyperLink ID="lnkGenerate" runat="server" NavigateUrl="#" meta:resourcekey="lnkGenerate" Visible="false">Generate random</asp:HyperLink></td> <asp:HyperLink ID="lnkGenerate" runat="server" NavigateUrl="#" meta:resourcekey="lnkGenerate" Visible="false">Generate random</asp:HyperLink></td>
</tr> </tr>
<tr> <tr>
<td class="SubHead"><asp:Label id="lblConfirmPassword" runat="server" meta:resourcekey="lblConfirmPassword"></asp:Label></td> <td class="SubHead">
<asp:Label ID="lblConfirmPassword" runat="server" meta:resourcekey="lblConfirmPassword"></asp:Label></td>
</tr> </tr>
<tr> <tr>
<td class="Normal"> <td class="Normal">
@ -18,7 +19,7 @@
meta:resourcekey="valRequireConfirmPassword" ErrorMessage="*" ControlToValidate="txtConfirmPassword" SetFocusOnError="True"></asp:RequiredFieldValidator> meta:resourcekey="valRequireConfirmPassword" ErrorMessage="*" ControlToValidate="txtConfirmPassword" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="valRequireEqualPassword" runat="server" ControlToCompare="txtPassword" <asp:CompareValidator ID="valRequireEqualPassword" runat="server" ControlToCompare="txtPassword"
ControlToValidate="txtConfirmPassword" meta:resourcekey="valRequireEqualPassword" Display="Dynamic" ErrorMessage="*"></asp:CompareValidator> ControlToValidate="txtConfirmPassword" meta:resourcekey="valRequireEqualPassword" Display="Dynamic" ErrorMessage="*"></asp:CompareValidator>
<asp:CustomValidator ID="valCorrectLength" runat="server" <asp:CustomValidator ID="valCorrectLength" runat="server"
ControlToValidate="txtPassword" ErrorMessage="len" Display="Dynamic" Enabled="false" ControlToValidate="txtPassword" ErrorMessage="len" Display="Dynamic" Enabled="false"
ClientValidationFunction="wspValidatePasswordLength" OnServerValidate="valCorrectLength_ServerValidate"></asp:CustomValidator> ClientValidationFunction="wspValidatePasswordLength" OnServerValidate="valCorrectLength_ServerValidate"></asp:CustomValidator>
@ -33,4 +34,55 @@
ClientValidationFunction="wspValidatePasswordSymbols" OnServerValidate="valRequireSymbols_ServerValidate"></asp:CustomValidator> ClientValidationFunction="wspValidatePasswordSymbols" OnServerValidate="valRequireSymbols_ServerValidate"></asp:CustomValidator>
</td> </td>
</tr> </tr>
</table> </table>
<% if (ValidationEnabled)
{%>
<div style="display: none;" id="password-hint-popup">
<h3 class="popover-title">
Password must meet the following requirements:
</h3>
<ul class="popover-content">
<li><%= string.Format("Password should be at least {0} characters", MinimumLength) %>
</li>
<li><%= string.Format("Password should be maximum {0} characters", MaximumLength) %>
</li>
<% if (MinimumUppercase > 0)
{%>
<li><%= string.Format("Password should contain at least {0} UPPERCASE characters", MinimumUppercase) %>
</li>
<% }%>
<% if (MinimumNumbers > 0)
{%>
<li><%= string.Format("Password should contain at least {0} numbers", MinimumNumbers) %>
</li>
<% }%>
<% if (MinimumSymbols > 0)
{%>
<li><%= string.Format("Password should contain at least {0} non-alphanumeric symbols", MinimumSymbols) %>
</li>
<% }%>
</ul>
</div>
<% }%>
<script>
$(document).ready(function () {
$('#<%=txtPassword.ClientID%>').poshytip({
className: 'tip-bluesimple',
showOn: 'focus',
alignTo: 'target',
alignX: 'center',
alignY: 'bottom',
offsetX: 2,
content: function () {
return $('#password-hint-popup').html();
}
});
});
</script>

View file

@ -277,7 +277,9 @@ namespace WebsitePanel.Portal
return ((matches != null) && matches.length >= minMatches); return ((matches != null) && matches.length >= minMatches);
} }
", true); ", true);
Page.ClientScript.RegisterClientScriptInclude("jqueryui-tooltip", ResolveUrl("~/JavaScript/jquery.poshytip.min.js"));
} }
} }

View file

@ -1,38 +1,9 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.1873
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View file

@ -6538,7 +6538,9 @@
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionApps.ascx.resx"> <Content Include="RDS\UserControls\App_LocalResources\RDSCollectionApps.ascx.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
<Content Include="ProviderControls\App_LocalResources\RDS_Settings.ascx.resx" /> <Content Include="ProviderControls\App_LocalResources\RDS_Settings.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="UserControls\App_LocalResources\DomainControl.ascx.resx"> <Content Include="UserControls\App_LocalResources\DomainControl.ascx.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>

File diff suppressed because one or more lines are too long

View file

@ -241,6 +241,7 @@
<Content Include="Error.htm" /> <Content Include="Error.htm" />
<Content Include="JavaScript\jquery-1.4.4.min.js" /> <Content Include="JavaScript\jquery-1.4.4.min.js" />
<Content Include="JavaScript\jquery-ui-1.8.9.min.js" /> <Content Include="JavaScript\jquery-ui-1.8.9.min.js" />
<Content Include="JavaScript\jquery.poshytip.min.js" />
<Content Include="JavaScript\jquery.window.js" /> <Content Include="JavaScript\jquery.window.js" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -366,10 +366,10 @@
<Target Name="WiXCreateRedistFileListBuild" DependsOnTargets="CreateFixDefaultPublicFolderMailboxBuild" > <Target Name="WiXCreateRedistFileListBuild" DependsOnTargets="CreateFixDefaultPublicFolderMailboxBuild" >
<RemoveDir Directories="$(WiXInstallerBuild)\ComponentsFiles" /> <RemoveDir Directories="$(WiXInstallerBuild)\ComponentsFiles" />
<MakeDir Directories="$(WiXInstallerBuild)\ComponentsFiles" /> <MakeDir Directories="$(WiXInstallerBuild)\ComponentsFiles" />
<Exec Command='"$(WIX)bin\heat.exe" dir $(EnterpriseServerBuild) -o $(WiXInstallerBuild)\ComponentsFiles\EnterpriseServerFiles.wxs -gg -sreg -srd -var wix.BUILDESPATH -cg EnterpriseServerFiles -dr INSTALLENTERPRISESERVERFOLDER' /> <Exec Command='"$(WIX)bin\heat.exe" dir $(EnterpriseServerBuild) -o $(WiXInstallerBuild)\ComponentsFiles\EnterpriseServerFiles.wxs -gg -sreg -srd -var wix.BUILDESPATH -cg EnterpriseServerFiles -dr PI_ESERVER_INSTALL_DIR' />
<Exec Command='"$(WIX)bin\heat.exe" dir $(ServerBuild) -o $(WiXInstallerBuild)\ComponentsFiles\ServerFiles.wxs -gg -sreg -srd -var wix.BUILDSPATH -cg ServerFiles -dr INSTALLSERVERFOLDER' /> <Exec Command='"$(WIX)bin\heat.exe" dir $(ServerBuild) -o $(WiXInstallerBuild)\ComponentsFiles\ServerFiles.wxs -gg -sreg -srd -var wix.BUILDSPATH -cg ServerFiles -dr PI_SERVER_INSTALL_DIR' />
<Exec Command='"$(WIX)bin\heat.exe" dir $(PortalBuild) -o $(WiXInstallerBuild)\ComponentsFiles\PortalFiles.wxs -gg -sreg -srd -var wix.BUILDPPATH -cg PortalFiles -dr INSTALLPORTALFOLDER' /> <Exec Command='"$(WIX)bin\heat.exe" dir $(PortalBuild) -o $(WiXInstallerBuild)\ComponentsFiles\PortalFiles.wxs -gg -sreg -srd -var wix.BUILDPPATH -cg PortalFiles -dr PI_PORTAL_INSTALL_DIR' />
<Exec Command='"$(WIX)bin\heat.exe" dir $(WebDavPortalBuild) -o $(WiXInstallerBuild)\ComponentsFiles\WebDavPortalFiles.wxs -gg -sreg -srd -var wix.BUILDWDPPATH -cg WebDavPortalFiles -dr INSTALLWEBDAVPORTALFOLDER' /> <Exec Command='"$(WIX)bin\heat.exe" dir $(WebDavPortalBuild) -o $(WiXInstallerBuild)\ComponentsFiles\WebDavPortalFiles.wxs -gg -sreg -srd -var wix.BUILDWDPPATH -cg WebDavPortalFiles -dr PI_WDPORTAL_INSTALL_DIR' />
</Target> </Target>
<Target Name="Build" DependsOnTargets="WiXCreateRedistFileListBuild"> <Target Name="Build" DependsOnTargets="WiXCreateRedistFileListBuild">