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); }
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)); }
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); }
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)); }
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)); }
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 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); }
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); }