Beispiel #1
0
        public static DialogResult UninstallBase(object obj)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
            string    componentId  = Utils.GetStringSetupParameter(args, "ComponentId");

            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables.SetupAction    = SetupActions.Uninstall;
            wizard.SetupVariables.IISVersion     = Utils.GetVersionSetupParameter(args, "IISVersion");
            wizard.SetupVariables.IISVersion     = Utils.GetVersionSetupParameter(args, "IISVersion");
            wizard.SetupVariables.UserMembership = (wizard.SetupVariables.IISVersion.Major == 7) ?
                                                   new string[] { "IIS_IUSRS" } :
            new string[] { "IIS_WPG" };
            LoadSetupVariablesFromConfig(wizard, componentId);

            IntroductionPage     page1 = new IntroductionPage();
            ConfirmUninstallPage page2 = new ConfirmUninstallPage();
            UninstallPage        page3 = new UninstallPage();

            page2.UninstallPage = page3;
            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;

            //show wizard
            IWin32Window owner = args["ParentForm"] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #2
0
		public static DialogResult UninstallBase(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
			var setupVariables = new SetupVariables
			{
				ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
				ComponentCode = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentCode),
				SetupAction = SetupActions.Uninstall,
				IISVersion = Global.IISVersion
			};
			//
			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			wizard.SetupVariables = setupVariables;
			//
			AppConfig.LoadComponentSettings(wizard.SetupVariables);

			IntroductionPage page1 = new IntroductionPage();
			ConfirmUninstallPage page2 = new ConfirmUninstallPage();
			UninstallPage page3 = new UninstallPage();
			page2.UninstallPage = page3;
			FinishPage page4 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
			wizard.LinkPages();
			wizard.SelectedPage = page1;

			//show wizard
			IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #3
0
		public static DialogResult UninstallBase(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
			string componentId = Utils.GetStringSetupParameter(args, "ComponentId");
			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			wizard.SetupVariables.SetupAction = SetupActions.Uninstall;
			wizard.SetupVariables.IISVersion = Utils.GetVersionSetupParameter(args, "IISVersion");
			wizard.SetupVariables.IISVersion = Utils.GetVersionSetupParameter(args, "IISVersion");
			wizard.SetupVariables.UserMembership = (wizard.SetupVariables.IISVersion.Major == 7) ?
				new string[] { "IIS_IUSRS" } :
				new string[] { "IIS_WPG" };
			LoadSetupVariablesFromConfig(wizard, componentId);

			IntroductionPage page1 = new IntroductionPage();
			ConfirmUninstallPage page2 = new ConfirmUninstallPage();
			UninstallPage page3 = new UninstallPage();
			page2.UninstallPage = page3;
			FinishPage page4 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
			wizard.LinkPages();
			wizard.SelectedPage = page1;

			//show wizard
			IWin32Window owner = args["ParentForm"] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #4
0
        public static object Update(object obj)
        {
            Hashtable args = Utils.GetSetupParameters(obj);

            var setupVariables = new SetupVariables
            {
                ComponentId     = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
                SetupAction     = SetupActions.Update,
                BaseDirectory   = Utils.GetStringSetupParameter(args, Global.Parameters.BaseDirectory),
                UpdateVersion   = Utils.GetStringSetupParameter(args, "UpdateVersion"),
                InstallerFolder = Utils.GetStringSetupParameter(args, Global.Parameters.InstallerFolder),
                Installer       = Utils.GetStringSetupParameter(args, Global.Parameters.Installer),
                InstallerType   = Utils.GetStringSetupParameter(args, Global.Parameters.InstallerType),
                InstallerPath   = Utils.GetStringSetupParameter(args, Global.Parameters.InstallerPath)
            };

            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            //
            wizard.SetupVariables = setupVariables;
            //
            AppConfig.LoadComponentSettings(wizard.SetupVariables);

            IntroductionPage     introPage = new IntroductionPage();
            LicenseAgreementPage licPage   = new LicenseAgreementPage();
            ExpressInstallPage   page2     = new ExpressInstallPage();
            //create install currentScenario
            InstallAction action = new InstallAction(ActionTypes.Backup);

            action.Description = "Backing up...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.DeleteFiles);
            action.Description = "Deleting files...";
            action.Path        = "setup\\delete.txt";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CopyFiles);
            action.Description = "Copying files...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page2.Actions.Add(action);

            FinishPage page3 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
            wizard.LinkPages();
            wizard.SelectedPage = introPage;

            //show wizard
            IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #5
0
        public static DialogResult Update(object obj)
        {
            Hashtable args = Utils.GetSetupParameters(obj);

            var setupVariables = new SetupVariables
            {
                ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
                SetupAction = SetupActions.Update,
                IISVersion  = Global.IISVersion
            };

            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables = setupVariables;
            //
            AppConfig.LoadComponentSettings(wizard.SetupVariables);

            IntroductionPage     introPage = new IntroductionPage();
            LicenseAgreementPage licPage   = new LicenseAgreementPage();
            ExpressInstallPage   page2     = new ExpressInstallPage();
            //create install currentScenario
            InstallAction action = new InstallAction(ActionTypes.Backup);

            action.Description = "Backing up...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.DeleteFiles);
            action.Description = "Deleting files...";
            action.Path        = "setup\\delete.txt";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CopyFiles);
            action.Description = "Copying files...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.ExecuteSql);
            action.Description = "Updating database...";
            action.Path        = "setup\\update_db.sql";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page2.Actions.Add(action);

            FinishPage page3 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
            wizard.LinkPages();
            wizard.SelectedPage = introPage;

            //show wizard
            Form parentForm = args[Global.Parameters.ParentForm] as Form;

            return(form.ShowDialog(parentForm));
        }
Beispiel #6
0
        public static DialogResult Setup(object obj)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
            string    componentId  = Utils.GetStringSetupParameter(args, "ComponentId");

            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables.SetupAction = SetupActions.Setup;
            LoadSetupVariablesFromConfig(wizard, componentId);
            wizard.SetupVariables.WebSiteId           = AppConfig.GetComponentSettingStringValue(componentId, "WebSiteId");
            wizard.SetupVariables.WebSiteIP           = AppConfig.GetComponentSettingStringValue(componentId, "WebSiteIP");
            wizard.SetupVariables.WebSitePort         = AppConfig.GetComponentSettingStringValue(componentId, "WebSitePort");
            wizard.SetupVariables.WebSiteDomain       = AppConfig.GetComponentSettingStringValue(componentId, "WebSiteDomain");
            wizard.SetupVariables.VirtualDirectory    = AppConfig.GetComponentSettingStringValue(componentId, "VirtualDirectory");
            wizard.SetupVariables.NewWebSite          = AppConfig.GetComponentSettingBooleanValue(componentId, "NewWebSite");
            wizard.SetupVariables.NewVirtualDirectory = AppConfig.GetComponentSettingBooleanValue(componentId, "NewVirtualDirectory");
            wizard.SetupVariables.VirtualDirectory    = AppConfig.GetComponentSettingStringValue(componentId, "VirtualDirectory");
            wizard.SetupVariables.IISVersion          = Utils.GetVersionSetupParameter(args, "IISVersion");

            //IntroductionPage page1 = new IntroductionPage();

            WebPage            page1 = new WebPage();
            UrlPage            page2 = new UrlPage();
            ExpressInstallPage page3 = new ExpressInstallPage();
            //create install actions
            InstallAction action = new InstallAction(ActionTypes.UpdateWebSite);

            action.Description = "Updating web site...";
            page3.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateEnterpriseServerUrl);
            action.Description = "Updating site settings...";
            page3.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page3.Actions.Add(action);

            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;


            //show wizard
            IWin32Window owner = args["ParentForm"] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #7
0
        public static object Setup(object obj)
        {
            var args         = Utils.GetSetupParameters(obj);
            var shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
            //
            var setupVariables = new SetupVariables
            {
                ComponentId       = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
                SetupAction       = SetupActions.Setup,
                IISVersion        = Global.IISVersion,
                ConfigurationFile = "web.config"
            };

            //
            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            //
            wizard.SetupVariables = setupVariables;
            //
            AppConfig.LoadComponentSettings(wizard.SetupVariables);

            WebPage            page1 = new WebPage();
            ServerPasswordPage page2 = new ServerPasswordPage();
            ExpressInstallPage page3 = new ExpressInstallPage();
            //create install actions
            InstallAction action = new InstallAction(ActionTypes.UpdateWebSite);

            action.Description = "Updating web site...";
            page3.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateServerPassword);
            action.Description = "Updating server password...";
            page3.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page3.Actions.Add(action);

            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;

            //show wizard
            IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #8
0
        public static DialogResult Uninstall(object obj)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
            //
            var setupVariables = new SetupVariables
            {
                ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
                IISVersion  = Global.IISVersion,
                SetupAction = SetupActions.Uninstall
            };

            //
            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables = setupVariables;
            //
            AppConfig.LoadComponentSettings(wizard.SetupVariables);
            //
            IntroductionPage     page1 = new IntroductionPage();
            ConfirmUninstallPage page2 = new ConfirmUninstallPage();
            UninstallPage        page3 = new UninstallPage();
            //create uninstall currentScenario
            InstallAction action = new InstallAction(ActionTypes.DeleteShortcuts);

            action.Description = "Deleting shortcuts...";
            action.Log         = "- Delete shortcuts";
            action.Name        = "Login to WebsitePanel.url";
            page3.Actions.Add(action);
            page2.UninstallPage = page3;

            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;

            //show wizard
            IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #9
0
        public static DialogResult Uninstall(object obj)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
            string    componentId  = Utils.GetStringSetupParameter(args, "ComponentId");

            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables.SetupAction    = SetupActions.Uninstall;
            wizard.SetupVariables.IISVersion     = Utils.GetVersionSetupParameter(args, "IISVersion");
            wizard.SetupVariables.UserMembership = (wizard.SetupVariables.IISVersion.Major == 7) ?
                                                   new string[] { "IIS_IUSRS" } :
            new string[] { "IIS_WPG" };
            LoadSetupVariablesFromConfig(wizard, componentId);

            IntroductionPage     page1 = new IntroductionPage();
            ConfirmUninstallPage page2 = new ConfirmUninstallPage();
            UninstallPage        page3 = new UninstallPage();
            //create uninstall actions
            InstallAction action = new InstallAction(ActionTypes.DeleteShortcuts);

            action.Description = "Deleting shortcuts...";
            action.Log         = "- Delete shortcuts";
            action.Name        = "Login to WebsitePanel.url";
            page3.Actions.Add(action);
            page2.UninstallPage = page3;

            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;

            //show wizard
            IWin32Window owner = args["ParentForm"] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #10
0
        public static object Uninstall(object obj)
        {
            Hashtable args = Utils.GetSetupParameters(obj);
            //
            string shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
            //
            var setupVariables = new SetupVariables
            {
                ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
                SetupAction = SetupActions.Uninstall,
                IISVersion  = Global.IISVersion
            };

            //
            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables = setupVariables;

            AppConfig.LoadComponentSettings(wizard.SetupVariables);

            IntroductionPage     page1 = new IntroductionPage();
            ConfirmUninstallPage page2 = new ConfirmUninstallPage();
            UninstallPage        page3 = new UninstallPage();

            page2.UninstallPage = page3;
            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;

            //show wizard
            IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;

            return(form.ShowModal(owner));
        }
		public static DialogResult Setup(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
			//
			var setupVariables = new SetupVariables
			{
				ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
				ConfigurationFile = "web.config",
				IISVersion = Global.IISVersion,
				SetupAction = SetupActions.Setup
			};
			//
			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			wizard.SetupVariables = setupVariables;
			//
			AppConfig.LoadComponentSettings(wizard.SetupVariables);

			//IntroductionPage page1 = new IntroductionPage();
			WebPage page1 = new WebPage();
			ServerAdminPasswordPage page2 = new ServerAdminPasswordPage();
			ExpressInstallPage page3 = new ExpressInstallPage();
			//create install currentScenario
			InstallAction action = new InstallAction(ActionTypes.UpdateWebSite);
			action.Description = "Updating web site...";
			page3.Actions.Add(action);

			action = new InstallAction(ActionTypes.UpdateServerAdminPassword);
			action.Description = "Updating serveradmin password...";
			page3.Actions.Add(action);

			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page3.Actions.Add(action);

			FinishPage page4 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
			wizard.LinkPages();
			wizard.SelectedPage = page1;

			//show wizard
			IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #12
0
        internal static DialogResult InstallBase(object obj, string minimalInstallerVersion)
        {
            Hashtable args = Utils.GetSetupParameters(obj);

            //check CS version
            string  shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
            Version version      = new Version(shellVersion);

            if (version < new Version(minimalInstallerVersion))
            {
                MessageBox.Show(
                    string.Format("WebsitePanel Installer {0} or higher required.", minimalInstallerVersion),
                    "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(DialogResult.Cancel);
            }

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            InitInstall(args, wizard);

            //ES url
            wizard.SetupVariables.EnterpriseServerURL = "http://127.0.0.1:9002";
            //web settings
            wizard.SetupVariables.WebSiteIP           = string.Empty;   //empty - to detect IP
            wizard.SetupVariables.WebSitePort         = "9001";
            wizard.SetupVariables.WebSiteDomain       = string.Empty;
            wizard.SetupVariables.NewWebSite          = true;
            wizard.SetupVariables.NewVirtualDirectory = false;
            wizard.SetupVariables.UserMembership      = (wizard.SetupVariables.IISVersion.Major == 7) ?
                                                        new string[] { "IIS_IUSRS" } :
            new string[] { "IIS_WPG" };
            wizard.SetupVariables.ConfigurationFile = "web.config";

            //Unattended setup
            LoadSetupVariablesFromSetupXml(wizard.SetupVariables.SetupXml, wizard.SetupVariables);

            //create wizard pages
            IntroductionPage       introPage = new IntroductionPage();
            LicenseAgreementPage   licPage   = new LicenseAgreementPage();
            ConfigurationCheckPage page1     = new ConfigurationCheckPage();
            ConfigurationCheck     check1    = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement");
            ConfigurationCheck     check2    = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement");
            ConfigurationCheck     check3    = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement");

            page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
            InstallFolderPage  page2 = new InstallFolderPage();
            WebPage            page3 = new WebPage();
            UserAccountPage    page4 = new UserAccountPage();
            UrlPage            page5 = new UrlPage();
            ExpressInstallPage page6 = new ExpressInstallPage();

            //create install actions
            InstallAction action = new InstallAction(ActionTypes.CopyFiles);

            action.Description = "Copying files...";
            page6.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CopyWebConfig);
            action.Description = "Copying web.config...";
            page6.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CreateWebSite);
            action.Description = "Creating web site...";
            page6.Actions.Add(action);

            action             = new InstallAction(ActionTypes.FolderPermissions);
            action.Description = "Configuring folder permissions...";
            page6.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateEnterpriseServerUrl);
            action.Description = "Updating site settings...";
            page6.Actions.Add(action);

            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page6.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CreateShortcuts);
            action.Description = "Creating shortcut...";
            page6.Actions.Add(action);

            FinishPage page7 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, page6, page7 });
            wizard.LinkPages();
            wizard.SelectedPage = introPage;
            //show wizard
            IWin32Window owner = args["ParentForm"] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #13
0
        public static DialogResult Update(object obj)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");

            Version version = new Version(shellVersion);

            if (version < new Version("1.0.1"))
            {
                MessageBox.Show("WebsitePanel Installer 1.0.1 or higher required.", "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(DialogResult.Cancel);
            }
            string componentId = Utils.GetStringSetupParameter(args, "ComponentId");

            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            LoadSetupVariablesFromConfig(wizard, componentId);
            if (wizard.SetupVariables.Version != "1.5.3")
            {
                MessageBox.Show("Please update to version 1.5.3", "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(DialogResult.Cancel);
            }

            wizard.SetupVariables.SetupAction     = SetupActions.Update;
            wizard.SetupVariables.BaseDirectory   = Utils.GetStringSetupParameter(args, "BaseDirectory");
            wizard.SetupVariables.UpdateVersion   = Utils.GetStringSetupParameter(args, "UpdateVersion");
            wizard.SetupVariables.InstallerFolder = Utils.GetStringSetupParameter(args, "InstallerFolder");
            wizard.SetupVariables.Installer       = Utils.GetStringSetupParameter(args, "Installer");
            wizard.SetupVariables.InstallerType   = Utils.GetStringSetupParameter(args, "InstallerType");
            wizard.SetupVariables.InstallerPath   = Utils.GetStringSetupParameter(args, "InstallerPath");

            IntroductionPage     introPage = new IntroductionPage();
            LicenseAgreementPage licPage   = new LicenseAgreementPage();
            ExpressInstallPage   page2     = new ExpressInstallPage();
            //create install actions
            InstallAction action = new InstallAction(ActionTypes.Backup);

            action.Description = "Backing up...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.DeleteFiles);
            action.Description = "Deleting files...";
            action.Path        = "setup\\delete.txt";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CopyFiles);
            action.Description = "Copying files...";
            page2.Actions.Add(action);


            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page2.Actions.Add(action);

            FinishPage page3 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
            wizard.LinkPages();
            wizard.SelectedPage = introPage;

            //show wizard
            IWin32Window owner = args["ParentForm"] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #14
0
		public static DialogResult UpdateBase(object obj, string minimalInstallerVersion,
			string versionsToUpgrade, bool updateSql, InstallAction versionSpecificAction)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");

			Version version = new Version(shellVersion);
			if (version < new Version(minimalInstallerVersion))
			{
				MessageBox.Show(
					string.Format("WebsitePanel Installer {0} or higher required.", minimalInstallerVersion),
					"Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return DialogResult.Cancel;
			}
			// Load application configuration
			AppConfig.LoadConfiguration();
			// 
			var setupVariables = new SetupVariables
			{
				SetupAction = SetupActions.Update,
				ComponentId = Utils.GetStringSetupParameter(args, "ComponentId"),
				IISVersion = Global.IISVersion,
			};
			// Load setup variables from app.config
			AppConfig.LoadComponentSettings(setupVariables);
			//
			InstallerForm form = new InstallerForm();
			form.Wizard.SetupVariables = setupVariables;
			Wizard wizard = form.Wizard;
			// Initialize setup variables with the data received from update procedure
			wizard.SetupVariables.BaseDirectory = Utils.GetStringSetupParameter(args, "BaseDirectory");
			wizard.SetupVariables.UpdateVersion = Utils.GetStringSetupParameter(args, "UpdateVersion");
			wizard.SetupVariables.InstallerFolder = Utils.GetStringSetupParameter(args, "InstallerFolder");
			wizard.SetupVariables.Installer = Utils.GetStringSetupParameter(args, "Installer");
			wizard.SetupVariables.InstallerType = Utils.GetStringSetupParameter(args, "InstallerType");
			wizard.SetupVariables.InstallerPath = Utils.GetStringSetupParameter(args, "InstallerPath");
			
			#region Support for multiple versions to upgrade from
			// Find out whether the version(s) are supported in that upgrade
			var upgradeSupported = versionsToUpgrade.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
				.Any(x => { return VersionEquals(wizard.SetupVariables.Version, x.Trim()); });
			// 
			if (upgradeSupported == false)
			{
				Log.WriteInfo(
					String.Format("Could not find a suitable version to upgrade. Current version: {0}; Versions supported: {1};", wizard.SetupVariables.Version, versionsToUpgrade));
				//
				MessageBox.Show(
					"Your current software version either is not supported or could not be upgraded at this time. Please send log file from the installer to the software vendor for further research on the issue.", "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				//
				return DialogResult.Cancel;
			} 
			#endregion

			//
			IntroductionPage introPage = new IntroductionPage();
			LicenseAgreementPage licPage = new LicenseAgreementPage();
			ExpressInstallPage page2 = new ExpressInstallPage();
			//create install currentScenario
			InstallAction action = new InstallAction(ActionTypes.StopApplicationPool);
			action.Description = "Stopping IIS Application Pool...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.Backup);
			action.Description = "Backing up...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.DeleteFiles);
			action.Description = "Deleting files...";
			action.Path = "setup\\delete.txt";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.CopyFiles);
			action.Description = "Copying files...";
			page2.Actions.Add(action);

			if (versionSpecificAction != null)
				page2.Actions.Add(versionSpecificAction);

			if (updateSql)
			{
				action = new InstallAction(ActionTypes.ExecuteSql);
				action.Description = "Updating database...";
				action.Path = "setup\\update_db.sql";
				page2.Actions.Add(action);
			}

			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.StartApplicationPool);
			action.Description = "Starting IIS Application Pool...";
			page2.Actions.Add(action);

			FinishPage page3 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
			wizard.LinkPages();
			wizard.SelectedPage = introPage;

			//show wizard
			IWin32Window owner = args["ParentForm"] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #15
0
		public static DialogResult UpdateBase(object obj, string minimalInstallerVersion,
			string versionToUpgrade, bool updateSql, InstallAction versionSpecificAction)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");

			Version version = new Version(shellVersion);
			if (version < new Version(minimalInstallerVersion))
			{
				MessageBox.Show(
					string.Format("WebsitePanel Installer {0} or higher required.", minimalInstallerVersion),
					"Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return DialogResult.Cancel;
			}
			string componentId = Utils.GetStringSetupParameter(args, "ComponentId");

			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			LoadSetupVariablesFromConfig(wizard.SetupVariables, componentId);
			if (!VersionEquals(wizard.SetupVariables.Version, versionToUpgrade))
			{
				MessageBox.Show(
					string.Format("Please update to version {0}", versionToUpgrade),
					"Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return DialogResult.Cancel;
			}

			wizard.SetupVariables.SetupAction = SetupActions.Update;
			wizard.SetupVariables.BaseDirectory = Utils.GetStringSetupParameter(args, "BaseDirectory");
			wizard.SetupVariables.UpdateVersion = Utils.GetStringSetupParameter(args, "UpdateVersion");
			wizard.SetupVariables.InstallerFolder = Utils.GetStringSetupParameter(args, "InstallerFolder");
			wizard.SetupVariables.Installer = Utils.GetStringSetupParameter(args, "Installer");
			wizard.SetupVariables.InstallerType = Utils.GetStringSetupParameter(args, "InstallerType");
			wizard.SetupVariables.InstallerPath = Utils.GetStringSetupParameter(args, "InstallerPath");
			wizard.SetupVariables.IISVersion = Utils.GetVersionSetupParameter(args, "IISVersion");

			IntroductionPage introPage = new IntroductionPage();
			LicenseAgreementPage licPage = new LicenseAgreementPage();
			ExpressInstallPage page2 = new ExpressInstallPage();
			//create install currentScenario
			InstallAction action = new InstallAction(ActionTypes.StopApplicationPool);
			action.Description = "Stopping IIS Application Pool...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.Backup);
			action.Description = "Backing up...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.DeleteFiles);
			action.Description = "Deleting files...";
			action.Path = "setup\\delete.txt";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.CopyFiles);
			action.Description = "Copying files...";
			page2.Actions.Add(action);

			if (versionSpecificAction != null)
				page2.Actions.Add(versionSpecificAction);

			if (updateSql)
			{
				action = new InstallAction(ActionTypes.ExecuteSql);
				action.Description = "Updating database...";
				action.Path = "setup\\update_db.sql";
				page2.Actions.Add(action);
			}

			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.StartApplicationPool);
			action.Description = "Starting IIS Application Pool...";
			page2.Actions.Add(action);

			FinishPage page3 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
			wizard.LinkPages();
			wizard.SelectedPage = introPage;

			//show wizard
			IWin32Window owner = args["ParentForm"] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #16
0
		public static DialogResult Uninstall(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
			string componentId = Utils.GetStringSetupParameter(args, "ComponentId");
			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			wizard.SetupVariables.SetupAction = SetupActions.Uninstall;
			wizard.SetupVariables.IISVersion = Utils.GetVersionSetupParameter(args, "IISVersion");
			wizard.SetupVariables.UserMembership = (wizard.SetupVariables.IISVersion.Major == 7) ?
				new string[] { "IIS_IUSRS" } :
				new string[] { "IIS_WPG" };
			LoadSetupVariablesFromConfig(wizard, componentId);

			IntroductionPage page1 = new IntroductionPage();
			ConfirmUninstallPage page2 = new ConfirmUninstallPage();
			UninstallPage page3 = new UninstallPage();
			//create uninstall actions
			InstallAction action = new InstallAction(ActionTypes.DeleteShortcuts);
			action.Description = "Deleting shortcuts...";
			action.Log = "- Delete shortcuts";
			action.Name = "Login to WebsitePanel.url";
			page3.Actions.Add(action);
			page2.UninstallPage = page3;

			FinishPage page4 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
			wizard.LinkPages();
			wizard.SelectedPage = page1;

			//show wizard
			IWin32Window owner = args["ParentForm"] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #17
0
        public static DialogResult UpdateBase(object obj, string minimalInstallerVersion,
                                              string versionsToUpgrade, bool updateSql, InstallAction versionSpecificAction)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");

            Version version = new Version(shellVersion);

            if (version < new Version(minimalInstallerVersion))
            {
                MessageBox.Show(
                    string.Format("WebsitePanel Installer {0} or higher required.", minimalInstallerVersion),
                    "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(DialogResult.Cancel);
            }
            // Load application configuration
            AppConfig.LoadConfiguration();
            //
            var setupVariables = new SetupVariables
            {
                SetupAction = SetupActions.Update,
                ComponentId = Utils.GetStringSetupParameter(args, "ComponentId"),
                IISVersion  = Global.IISVersion,
            };

            // Load setup variables from app.config
            AppConfig.LoadComponentSettings(setupVariables);
            //
            InstallerForm form = new InstallerForm();

            form.Wizard.SetupVariables = setupVariables;
            Wizard wizard = form.Wizard;

            // Initialize setup variables with the data received from update procedure
            wizard.SetupVariables.BaseDirectory   = Utils.GetStringSetupParameter(args, "BaseDirectory");
            wizard.SetupVariables.UpdateVersion   = Utils.GetStringSetupParameter(args, "UpdateVersion");
            wizard.SetupVariables.InstallerFolder = Utils.GetStringSetupParameter(args, "InstallerFolder");
            wizard.SetupVariables.Installer       = Utils.GetStringSetupParameter(args, "Installer");
            wizard.SetupVariables.InstallerType   = Utils.GetStringSetupParameter(args, "InstallerType");
            wizard.SetupVariables.InstallerPath   = Utils.GetStringSetupParameter(args, "InstallerPath");

            #region Support for multiple versions to upgrade from
            // Find out whether the version(s) are supported in that upgrade
            var upgradeSupported = versionsToUpgrade.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                                   .Any(x => { return(VersionEquals(wizard.SetupVariables.Version, x.Trim())); });
            //
            if (upgradeSupported == false)
            {
                Log.WriteInfo(
                    String.Format("Could not find a suitable version to upgrade. Current version: {0}; Versions supported: {1};", wizard.SetupVariables.Version, versionsToUpgrade));
                //
                MessageBox.Show(
                    "Your current software version either is not supported or could not be upgraded at this time. Please send log file from the installer to the software vendor for further research on the issue.", "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                //
                return(DialogResult.Cancel);
            }
            #endregion

            //
            IntroductionPage     introPage = new IntroductionPage();
            LicenseAgreementPage licPage   = new LicenseAgreementPage();
            ExpressInstallPage   page2     = new ExpressInstallPage();
            //create install currentScenario
            InstallAction action = new InstallAction(ActionTypes.StopApplicationPool);
            action.Description = "Stopping IIS Application Pool...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.Backup);
            action.Description = "Backing up...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.DeleteFiles);
            action.Description = "Deleting files...";
            action.Path        = "setup\\delete.txt";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CopyFiles);
            action.Description = "Copying files...";
            page2.Actions.Add(action);

            if (versionSpecificAction != null)
            {
                page2.Actions.Add(versionSpecificAction);
            }

            if (updateSql)
            {
                action             = new InstallAction(ActionTypes.ExecuteSql);
                action.Description = "Updating database...";
                action.Path        = "setup\\update_db.sql";
                page2.Actions.Add(action);
            }

            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.StartApplicationPool);
            action.Description = "Starting IIS Application Pool...";
            page2.Actions.Add(action);

            FinishPage page3 = new FinishPage();
            wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
            wizard.LinkPages();
            wizard.SelectedPage = introPage;

            //show wizard
            IWin32Window owner = args["ParentForm"] as IWin32Window;
            return(form.ShowModal(owner));
        }
Beispiel #18
0
		public static DialogResult Uninstall(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
			//
			var setupVariables = new SetupVariables
			{
				ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
				IISVersion = Global.IISVersion,
				SetupAction = SetupActions.Uninstall
			};
			//
			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			wizard.SetupVariables = setupVariables;
			//
			AppConfig.LoadComponentSettings(wizard.SetupVariables);
			//
			IntroductionPage page1 = new IntroductionPage();
			ConfirmUninstallPage page2 = new ConfirmUninstallPage();
			UninstallPage page3 = new UninstallPage();
			//create uninstall currentScenario
			InstallAction action = new InstallAction(ActionTypes.DeleteShortcuts);
			action.Description = "Deleting shortcuts...";
			action.Log = "- Delete shortcuts";
			action.Name = "Login to WebsitePanel.url";
			page3.Actions.Add(action);
			page2.UninstallPage = page3;

			FinishPage page4 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
			wizard.LinkPages();
			wizard.SelectedPage = page1;

			//show wizard
			IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #19
0
        public static DialogResult UpdateBase(object obj, string minimalInstallerVersion,
                                              string versionToUpgrade, bool updateSql, InstallAction versionSpecificAction)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");

            Version version = new Version(shellVersion);

            if (version < new Version(minimalInstallerVersion))
            {
                MessageBox.Show(
                    string.Format("WebsitePanel Installer {0} or higher required.", minimalInstallerVersion),
                    "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(DialogResult.Cancel);
            }
            string componentId = Utils.GetStringSetupParameter(args, "ComponentId");

            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            LoadSetupVariablesFromConfig(wizard.SetupVariables, componentId);
            if (!VersionEquals(wizard.SetupVariables.Version, versionToUpgrade))
            {
                MessageBox.Show(
                    string.Format("Please update to version {0}", versionToUpgrade),
                    "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(DialogResult.Cancel);
            }

            wizard.SetupVariables.SetupAction     = SetupActions.Update;
            wizard.SetupVariables.BaseDirectory   = Utils.GetStringSetupParameter(args, "BaseDirectory");
            wizard.SetupVariables.UpdateVersion   = Utils.GetStringSetupParameter(args, "UpdateVersion");
            wizard.SetupVariables.InstallerFolder = Utils.GetStringSetupParameter(args, "InstallerFolder");
            wizard.SetupVariables.Installer       = Utils.GetStringSetupParameter(args, "Installer");
            wizard.SetupVariables.InstallerType   = Utils.GetStringSetupParameter(args, "InstallerType");
            wizard.SetupVariables.InstallerPath   = Utils.GetStringSetupParameter(args, "InstallerPath");
            wizard.SetupVariables.IISVersion      = Utils.GetVersionSetupParameter(args, "IISVersion");

            IntroductionPage     introPage = new IntroductionPage();
            LicenseAgreementPage licPage   = new LicenseAgreementPage();
            ExpressInstallPage   page2     = new ExpressInstallPage();
            //create install currentScenario
            InstallAction action = new InstallAction(ActionTypes.StopApplicationPool);

            action.Description = "Stopping IIS Application Pool...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.Backup);
            action.Description = "Backing up...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.DeleteFiles);
            action.Description = "Deleting files...";
            action.Path        = "setup\\delete.txt";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.CopyFiles);
            action.Description = "Copying files...";
            page2.Actions.Add(action);

            if (versionSpecificAction != null)
            {
                page2.Actions.Add(versionSpecificAction);
            }

            if (updateSql)
            {
                action             = new InstallAction(ActionTypes.ExecuteSql);
                action.Description = "Updating database...";
                action.Path        = "setup\\update_db.sql";
                page2.Actions.Add(action);
            }

            action             = new InstallAction(ActionTypes.UpdateConfig);
            action.Description = "Updating system configuration...";
            page2.Actions.Add(action);

            action             = new InstallAction(ActionTypes.StartApplicationPool);
            action.Description = "Starting IIS Application Pool...";
            page2.Actions.Add(action);

            FinishPage page3 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
            wizard.LinkPages();
            wizard.SelectedPage = introPage;

            //show wizard
            IWin32Window owner = args["ParentForm"] as IWin32Window;

            return(form.ShowModal(owner));
        }
Beispiel #20
0
		public static DialogResult SetupBase(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
			string componentId = Utils.GetStringSetupParameter(args, "ComponentId");
			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			wizard.SetupVariables.SetupAction = SetupActions.Setup;
			LoadSetupVariablesFromConfig(wizard.SetupVariables, componentId);
			wizard.SetupVariables.WebSiteId = AppConfig.GetComponentSettingStringValue(componentId, "WebSiteId");
			wizard.SetupVariables.WebSiteIP = AppConfig.GetComponentSettingStringValue(componentId, "WebSiteIP");
			wizard.SetupVariables.WebSitePort = AppConfig.GetComponentSettingStringValue(componentId, "WebSitePort");
			wizard.SetupVariables.WebSiteDomain = AppConfig.GetComponentSettingStringValue(componentId, "WebSiteDomain");
			wizard.SetupVariables.NewWebSite = AppConfig.GetComponentSettingBooleanValue(componentId, "NewWebSite");
			wizard.SetupVariables.NewVirtualDirectory = AppConfig.GetComponentSettingBooleanValue(componentId, "NewVirtualDirectory");
			wizard.SetupVariables.VirtualDirectory = AppConfig.GetComponentSettingStringValue(componentId, "VirtualDirectory");
			wizard.SetupVariables.IISVersion = Utils.GetVersionSetupParameter(args, "IISVersion");
			//IntroductionPage page1 = new IntroductionPage();
			WebPage page2 = new WebPage();
			ExpressInstallPage page3 = new ExpressInstallPage();
			//create install currentScenario
			InstallAction action = new InstallAction(ActionTypes.UpdateWebSite);
			action.Description = "Updating web site...";
			page3.Actions.Add(action);

			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page3.Actions.Add(action);

			FinishPage page4 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { page2, page3, page4 });
			wizard.LinkPages();
			wizard.SelectedPage = page2;

			//show wizard
			IWin32Window owner = args["ParentForm"] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #21
0
		public static DialogResult Update(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");

			Version version = new Version(shellVersion);
			if ( version < new Version("1.0.1"))
			{
				MessageBox.Show("WebsitePanel Installer 1.0.1 or higher required.", "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return DialogResult.Cancel;
			}
			string componentId = Utils.GetStringSetupParameter(args, "ComponentId");

			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			LoadSetupVariablesFromConfig(wizard, componentId);
			if (wizard.SetupVariables.Version != "1.5.3")
			{
				MessageBox.Show("Please update to version 1.5.3", "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return DialogResult.Cancel;
			}

			wizard.SetupVariables.SetupAction = SetupActions.Update;
			wizard.SetupVariables.BaseDirectory = Utils.GetStringSetupParameter(args, "BaseDirectory");
			wizard.SetupVariables.UpdateVersion = Utils.GetStringSetupParameter(args, "UpdateVersion");
			wizard.SetupVariables.InstallerFolder = Utils.GetStringSetupParameter(args, "InstallerFolder");
			wizard.SetupVariables.Installer = Utils.GetStringSetupParameter(args, "Installer");
			wizard.SetupVariables.InstallerType = Utils.GetStringSetupParameter(args, "InstallerType");
			wizard.SetupVariables.InstallerPath = Utils.GetStringSetupParameter(args, "InstallerPath");

			IntroductionPage introPage = new IntroductionPage();
			LicenseAgreementPage licPage = new LicenseAgreementPage();
			ExpressInstallPage page2 = new ExpressInstallPage();
			//create install actions
			InstallAction action = new InstallAction(ActionTypes.Backup);
			action.Description = "Backing up...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.DeleteFiles);
			action.Description = "Deleting files...";
			action.Path = "setup\\delete.txt";
			page2.Actions.Add(action);
			
			action = new InstallAction(ActionTypes.CopyFiles);
			action.Description = "Copying files...";
			page2.Actions.Add(action);


			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page2.Actions.Add(action);

			FinishPage page3 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
			wizard.LinkPages();
			wizard.SelectedPage = introPage;

			//show wizard
			IWin32Window owner = args["ParentForm"] as IWin32Window;
			return form.ShowModal(owner);
		}
		public static DialogResult Update(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);

			var setupVariables = new SetupVariables
			{
				ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
				SetupAction = SetupActions.Update,
				IISVersion = Global.IISVersion
			};

			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			wizard.SetupVariables = setupVariables;
			//
			AppConfig.LoadComponentSettings(wizard.SetupVariables);

			IntroductionPage introPage = new IntroductionPage();
			LicenseAgreementPage licPage = new LicenseAgreementPage();
			ExpressInstallPage page2 = new ExpressInstallPage();
			//create install currentScenario
			InstallAction action = new InstallAction(ActionTypes.Backup);
			action.Description = "Backing up...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.DeleteFiles);
			action.Description = "Deleting files...";
			action.Path = "setup\\delete.txt";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.CopyFiles);
			action.Description = "Copying files...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.ExecuteSql);
			action.Description = "Updating database...";
			action.Path = "setup\\update_db.sql";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page2.Actions.Add(action);

			FinishPage page3 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
			wizard.LinkPages();
			wizard.SelectedPage = introPage;

			//show wizard
			Form parentForm = args[Global.Parameters.ParentForm] as Form;
			return form.ShowDialog(parentForm);
		}
		internal static object InstallBase(object obj, string minimalInstallerVersion)
		{
			var args = Utils.GetSetupParameters(obj);
			//check CS version
			var shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
			var shellMode = Utils.GetStringSetupParameter(args, Global.Parameters.ShellMode);
			var version = new Version(shellVersion);

			var setupVariables = new SetupVariables
			{
				ConnectionString = Global.EntServer.AspNetConnectionStringFormat,
				DatabaseServer = Global.EntServer.DefaultDbServer,
				Database = Global.EntServer.DefaultDatabase,
				CreateDatabase = true,
				WebSiteIP = Global.EntServer.DefaultIP,
				WebSitePort = Global.EntServer.DefaultPort,
				WebSiteDomain = String.Empty,
				NewWebSite = true,
				NewVirtualDirectory = false,
				ConfigurationFile = "web.config",
				UpdateServerAdminPassword = true,
				ServerAdminPassword = "",
			};

			//
			InitInstall(args, setupVariables);
			//
			var eam = new EntServerActionManager(setupVariables);
			//
			eam.PrepareDistributiveDefaults();
			//
			if (shellMode.Equals(Global.SilentInstallerShell, StringComparison.OrdinalIgnoreCase))
			{
				if (version < new Version(minimalInstallerVersion))
				{
					Utils.ShowConsoleErrorMessage(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion);
					//
					return false;
				}

				try
				{
					var success = true;
					//
					setupVariables.ServerAdminPassword = Utils.GetStringSetupParameter(args, Global.Parameters.ServerAdminPassword);
					setupVariables.Database = Utils.GetStringSetupParameter(args, Global.Parameters.DatabaseName);
					setupVariables.DatabaseServer = Utils.GetStringSetupParameter(args, Global.Parameters.DatabaseServer);
					//
					setupVariables.DbInstallConnectionString = SqlUtils.BuildDbServerMasterConnectionString(
						setupVariables.DatabaseServer,
						Utils.GetStringSetupParameter(args, Global.Parameters.DbServerAdmin),
						Utils.GetStringSetupParameter(args, Global.Parameters.DbServerAdminPassword)
					);
					//
					eam.ActionError += new EventHandler<ActionErrorEventArgs>((object sender, ActionErrorEventArgs e) =>
					{
						Utils.ShowConsoleErrorMessage(e.ErrorMessage);
						//
						Log.WriteError(e.ErrorMessage);
						//
						success = false;
					});
					//
					eam.Start();
					//
					return success;
				}
				catch (Exception ex)
				{
					Log.WriteError("Failed to install the component", ex);
					//
					return false;
				}
			}
			else
			{
				if (version < new Version(minimalInstallerVersion))
				{
					MessageBox.Show(string.Format(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion), "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
					return DialogResult.Cancel;
				}

				InstallerForm form = new InstallerForm();
				Wizard wizard = form.Wizard;
				wizard.SetupVariables = setupVariables;
				wizard.ActionManager = eam;

				//Unattended setup
				LoadSetupVariablesFromSetupXml(wizard.SetupVariables.SetupXml, wizard.SetupVariables);
				//create wizard pages
				var introPage = new IntroductionPage();
				var licPage = new LicenseAgreementPage();
				var page1 = new ConfigurationCheckPage();
				//
				ConfigurationCheck check1 = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement");
				ConfigurationCheck check2 = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement");
				ConfigurationCheck check3 = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement");
				//
				page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
				//
				var page2 = new InstallFolderPage();
				var page3 = new WebPage();
				var page4 = new UserAccountPage();
				var page5 = new DatabasePage();
				var passwordPage = new ServerAdminPasswordPage();
				//
				var page6 = new ExpressInstallPage2();
				//
				var page7 = new FinishPage();
				wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, passwordPage, page6, page7 });
				wizard.LinkPages();
				wizard.SelectedPage = introPage;

				//show wizard
				IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;
				return form.ShowModal(owner);
			}
		}
Beispiel #24
0
        internal static object InstallBase(object obj, string minimalInstallerVersion)
        {
            Hashtable args = Utils.GetSetupParameters(obj);
            //check CS version
            var shellMode      = Utils.GetStringSetupParameter(args, Global.Parameters.ShellMode);
            var version        = new Version(Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion));
            var setupVariables = new SetupVariables
            {
                SetupAction         = SetupActions.Install,
                ConfigurationFile   = "web.config",
                WebSiteIP           = Global.WebPortal.DefaultIP,       //empty - to detect IP
                WebSitePort         = Global.WebPortal.DefaultPort,
                WebSiteDomain       = String.Empty,
                NewWebSite          = true,
                NewVirtualDirectory = false,
                EnterpriseServerURL = Global.WebPortal.DefaultEntServURL
            };

            //
            InitInstall(args, setupVariables);
            //
            var wam = new WebPortalActionManager(setupVariables);

            //
            wam.PrepareDistributiveDefaults();
            //
            if (shellMode.Equals(Global.SilentInstallerShell, StringComparison.OrdinalIgnoreCase))
            {
                if (version < new Version(minimalInstallerVersion))
                {
                    Utils.ShowConsoleErrorMessage(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion);
                    //
                    return(false);
                }

                try
                {
                    var success = true;
                    //
                    setupVariables.EnterpriseServerURL = Utils.GetStringSetupParameter(args, Global.Parameters.EnterpriseServerUrl);
                    //
                    wam.ActionError += new EventHandler <ActionErrorEventArgs>((object sender, ActionErrorEventArgs e) =>
                    {
                        Utils.ShowConsoleErrorMessage(e.ErrorMessage);
                        //
                        Log.WriteError(e.ErrorMessage);
                        //
                        success = false;
                    });
                    //
                    wam.Start();
                    //
                    return(success);
                }
                catch (Exception ex)
                {
                    Log.WriteError("Failed to install the component", ex);
                    //
                    return(false);
                }
            }
            else
            {
                if (version < new Version(minimalInstallerVersion))
                {
                    //
                    MessageBox.Show(String.Format(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion), "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //
                    return(DialogResult.Cancel);
                }
                //
                InstallerForm form   = new InstallerForm();
                Wizard        wizard = form.Wizard;
                wizard.SetupVariables = setupVariables;
                wizard.ActionManager  = wam;
                //Unattended setup
                LoadSetupVariablesFromSetupXml(wizard.SetupVariables.SetupXml, wizard.SetupVariables);

                //create wizard pages
                var introPage             = new IntroductionPage();
                var licPage               = new LicenseAgreementPage();
                var page1                 = new ConfigurationCheckPage();
                ConfigurationCheck check1 = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement");
                ConfigurationCheck check2 = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement");
                ConfigurationCheck check3 = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement");
                page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
                var page2 = new InstallFolderPage();
                var page3 = new WebPage();
                var page4 = new UserAccountPage();
                var page5 = new UrlPage();
                var page6 = new ExpressInstallPage2();

                var page7 = new FinishPage();
                wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, page6, page7 });
                wizard.LinkPages();
                wizard.SelectedPage = introPage;
                //show wizard
                IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;
                return(form.ShowModal(owner));
            }
        }
Beispiel #25
0
		public static object Update(object obj)
		{
			Hashtable args = Utils.GetSetupParameters(obj);

			var setupVariables = new SetupVariables
			{
				ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
				SetupAction = SetupActions.Update,
				BaseDirectory = Utils.GetStringSetupParameter(args, Global.Parameters.BaseDirectory),
				UpdateVersion = Utils.GetStringSetupParameter(args, "UpdateVersion"),
				InstallerFolder = Utils.GetStringSetupParameter(args, Global.Parameters.InstallerFolder),
				Installer = Utils.GetStringSetupParameter(args, Global.Parameters.Installer),
				InstallerType = Utils.GetStringSetupParameter(args, Global.Parameters.InstallerType),
				InstallerPath = Utils.GetStringSetupParameter(args, Global.Parameters.InstallerPath)
			};

			AppConfig.LoadConfiguration();

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			//
			wizard.SetupVariables = setupVariables;
			//
			AppConfig.LoadComponentSettings(wizard.SetupVariables);

			IntroductionPage introPage = new IntroductionPage();
			LicenseAgreementPage licPage = new LicenseAgreementPage();
			ExpressInstallPage page2 = new ExpressInstallPage();
			//create install currentScenario
			InstallAction action = new InstallAction(ActionTypes.Backup);
			action.Description = "Backing up...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.DeleteFiles);
			action.Description = "Deleting files...";
			action.Path = "setup\\delete.txt";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.CopyFiles);
			action.Description = "Copying files...";
			page2.Actions.Add(action);

			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page2.Actions.Add(action);

			FinishPage page3 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { introPage, licPage, page2, page3 });
			wizard.LinkPages();
			wizard.SelectedPage = introPage;

			//show wizard
			IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #26
0
		internal static DialogResult InstallBase(object obj, string minimalInstallerVersion)
		{
			Hashtable args = Utils.GetSetupParameters(obj);

			//check CS version
			string shellVersion = Utils.GetStringSetupParameter(args, "ShellVersion");
			Version version = new Version(shellVersion);
			if (version < new Version(minimalInstallerVersion))
			{
				MessageBox.Show(
					string.Format("WebsitePanel Installer {0} or higher required.", minimalInstallerVersion),
					"Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return DialogResult.Cancel;
			}

			InstallerForm form = new InstallerForm();
			Wizard wizard = form.Wizard;
			InitInstall(args, wizard);

			//web settings
			wizard.SetupVariables.WebSiteIP = "127.0.0.1";
			wizard.SetupVariables.WebSitePort = "9003";
			wizard.SetupVariables.WebSiteDomain = string.Empty;
			wizard.SetupVariables.NewWebSite = true;
			wizard.SetupVariables.NewVirtualDirectory = false;
			if(wizard.SetupVariables.IISVersion.Major == 7)
				wizard.SetupVariables.UserMembership = new string[] { "AD:Domain Admins", "SID:" + SystemSID.ADMINISTRATORS, "IIS_IUSRS" };
			else
				wizard.SetupVariables.UserMembership = new string[] { "AD:Domain Admins", "SID:" + SystemSID.ADMINISTRATORS, "IIS_WPG" };
			wizard.SetupVariables.ConfigurationFile = "web.config";

			//Unattended setup
			LoadSetupVariablesFromSetupXml(wizard.SetupVariables.SetupXml, wizard.SetupVariables);

			//create wizard pages
			IntroductionPage introPage = new IntroductionPage();
			LicenseAgreementPage licPage = new LicenseAgreementPage();
			ConfigurationCheckPage page1 = new ConfigurationCheckPage();
			ConfigurationCheck check1 = new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement");
			ConfigurationCheck check2 = new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement");
			ConfigurationCheck check3 = new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement");
			page1.Checks.AddRange(new ConfigurationCheck[] { check1, check2, check3 });
			InstallFolderPage page2 = new InstallFolderPage();
			WebPage page3 = new WebPage();
			UserAccountPage page4 = new UserAccountPage();
			ServerPasswordPage page5 = new ServerPasswordPage();
			ExpressInstallPage page6 = new ExpressInstallPage();
		
			//create install actions
			InstallAction action = new InstallAction(ActionTypes.CopyFiles);
			action.Description = "Copying files...";
			page6.Actions.Add(action);


			action = new InstallAction(ActionTypes.CreateWebSite);
			action.Description = "Creating web site...";
			page6.Actions.Add(action);

			action = new InstallAction(ActionTypes.FolderPermissions);
			action.Description = "Configuring folder permissions...";
			page6.Actions.Add(action);

			action = new InstallAction(ActionTypes.ServerPassword);
			action.Description = "Updating server password...";
			page6.Actions.Add(action);

			action = new InstallAction(ActionTypes.UpdateConfig);
			action.Description = "Updating system configuration...";
			page6.Actions.Add(action);

			
			FinishPage page7 = new FinishPage();
			wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, page6, page7 });
			wizard.LinkPages();
			wizard.SelectedPage = introPage;
			
			//show wizard
			IWin32Window owner = args["ParentForm"] as IWin32Window;
			return form.ShowModal(owner);
		}
Beispiel #27
0
        internal static object InstallBase(object obj, string minimalInstallerVersion)
        {
            Hashtable args = Utils.GetSetupParameters(obj);

            //check CS version
            string  shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
            var     shellMode    = Utils.GetStringSetupParameter(args, Global.Parameters.ShellMode);
            Version version      = new Version(shellVersion);
            //
            var setupVariables = new SetupVariables
            {
                SetupAction = SetupActions.Install,
                IISVersion  = Global.IISVersion
            };

            //
            InitInstall(args, setupVariables);
            //Unattended setup
            LoadSetupVariablesFromSetupXml(setupVariables.SetupXml, setupVariables);
            //
            var sam = new ServerActionManager(setupVariables);

            // Prepare installation defaults
            sam.PrepareDistributiveDefaults();
            // Silent Installer Mode
            if (shellMode.Equals(Global.SilentInstallerShell, StringComparison.OrdinalIgnoreCase))
            {
                if (version < new Version(minimalInstallerVersion))
                {
                    Utils.ShowConsoleErrorMessage(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion);
                    //
                    return(false);
                }

                try
                {
                    var success = true;
                    //
                    setupVariables.ServerPassword = Utils.GetStringSetupParameter(args, Global.Parameters.ServerPassword);
                    //
                    sam.ActionError += new EventHandler <ActionErrorEventArgs>((object sender, ActionErrorEventArgs e) =>
                    {
                        Utils.ShowConsoleErrorMessage(e.ErrorMessage);
                        //
                        Log.WriteError(e.ErrorMessage);
                        //
                        success = false;
                    });
                    //
                    sam.Start();
                    //
                    return(success);
                }
                catch (Exception ex)
                {
                    Log.WriteError("Failed to install the component", ex);
                    //
                    return(false);
                }
            }
            else
            {
                if (version < new Version(minimalInstallerVersion))
                {
                    MessageBox.Show(String.Format(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion), "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //
                    return(DialogResult.Cancel);
                }

                var form   = new InstallerForm();
                var wizard = form.Wizard;
                wizard.SetupVariables = setupVariables;
                //
                wizard.ActionManager = sam;

                //create wizard pages
                var introPage = new IntroductionPage();
                var licPage   = new LicenseAgreementPage();
                //
                var page1 = new ConfigurationCheckPage();
                page1.Checks.AddRange(new ConfigurationCheck[]
                {
                    new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement"),
                    new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement"),
                    new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement")
                });
                //
                var page2 = new InstallFolderPage();
                var page3 = new WebPage();
                var page4 = new UserAccountPage();
                var page5 = new ServerPasswordPage();
                var page6 = new ExpressInstallPage2();
                var page7 = new FinishPage();
                //
                wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, page6, page7 });
                wizard.LinkPages();
                wizard.SelectedPage = introPage;

                //show wizard
                IWin32Window owner = args["ParentForm"] as IWin32Window;
                return(form.ShowModal(owner));
            }
        }
Beispiel #28
0
		internal static object InstallBase(object obj, string minimalInstallerVersion)
		{
			Hashtable args = Utils.GetSetupParameters(obj);

			//check CS version
			string shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
			var shellMode = Utils.GetStringSetupParameter(args, Global.Parameters.ShellMode);
			Version version = new Version(shellVersion);
			//
			var setupVariables = new SetupVariables
			{
				SetupAction = SetupActions.Install,
				IISVersion = Global.IISVersion
			};
			//
			InitInstall(args, setupVariables);
			//Unattended setup
			LoadSetupVariablesFromSetupXml(setupVariables.SetupXml, setupVariables);
			//
			var sam = new ServerActionManager(setupVariables);
			// Prepare installation defaults
			sam.PrepareDistributiveDefaults();
			// Silent Installer Mode
			if (shellMode.Equals(Global.SilentInstallerShell, StringComparison.OrdinalIgnoreCase))
			{
				if (version < new Version(minimalInstallerVersion))
				{
					Utils.ShowConsoleErrorMessage(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion);
					//
					return false;
				}

				try
				{
					var success = true;
					//
					setupVariables.ServerPassword = Utils.GetStringSetupParameter(args, Global.Parameters.ServerPassword);
					//
					sam.ActionError += new EventHandler<ActionErrorEventArgs>((object sender, ActionErrorEventArgs e) =>
					{
						Utils.ShowConsoleErrorMessage(e.ErrorMessage);
						//
						Log.WriteError(e.ErrorMessage);
						//
						success = false;
					});
					//
					sam.Start();
					//
					return success;
				}
				catch (Exception ex)
				{
					Log.WriteError("Failed to install the component", ex);
					//
					return false;
				}
			}
			else
			{
				if (version < new Version(minimalInstallerVersion))
				{
					MessageBox.Show(String.Format(Global.Messages.InstallerVersionIsObsolete, minimalInstallerVersion), "Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Warning);
					//
					return DialogResult.Cancel;
				}

				var form = new InstallerForm();
				var wizard = form.Wizard;
				wizard.SetupVariables = setupVariables;
				//
				wizard.ActionManager = sam;

				//create wizard pages
				var introPage = new IntroductionPage();
				var licPage = new LicenseAgreementPage();
				//
				var page1 = new ConfigurationCheckPage();
				page1.Checks.AddRange(new ConfigurationCheck[]
				{ 
					new ConfigurationCheck(CheckTypes.OperationSystem, "Operating System Requirement"), 
					new ConfigurationCheck(CheckTypes.IISVersion, "IIS Requirement"), 
					new ConfigurationCheck(CheckTypes.ASPNET, "ASP.NET Requirement")
				});
				//
				var page2 = new InstallFolderPage();
				var page3 = new WebPage();
				var page4 = new UserAccountPage();
				var page5 = new ServerPasswordPage();
				var page6 = new ExpressInstallPage2();
				var page7 = new FinishPage();
				//
				wizard.Controls.AddRange(new Control[] { introPage, licPage, page1, page2, page3, page4, page5, page6, page7 });
				wizard.LinkPages();
				wizard.SelectedPage = introPage;

				//show wizard
				IWin32Window owner = args["ParentForm"] as IWin32Window;
				return form.ShowModal(owner);
			}
		}