public void StartServiceExe() { IM.isServiceInstallation = true; IM.RunExe(ServiceInstallerAppTitle, "[CLASS:Static; INSTANCE:3]", "Welcome to the InstallShield Wizard for Infor Risk & Compliance Services", AutoHelper.ServicesInstallerExe);//[CLASS:WindowsForms10.STATIC.app.0.141b42a_r6_ad1; INSTANCE:4] var isServicesInstalled = AutoHelper.IsServicesInstalled(); var processes = Process.GetProcesses(); foreach (var theProcess in processes) { if (theProcess.MainWindowTitle == ServiceInstallerAppTitle) { if (!isServicesInstalled) { IM.Welcome(ServiceInstallerAppTitle, Text, "[CLASS:Button; INSTANCE:1]", "[CLASS:Static; INSTANCE:3]", "Welcome to the InstallShield Wizard for Infor Risk & Compliance Services", theProcess); IM.SelectLicense(ServiceInstallerAppTitle, "&Next >", "[CLASS:Button; INSTANCE:3]", "[CLASS:Static; INSTANCE:5]", "Choose license file location", "[CLASS:Button; INSTANCE:6]"); IM.CustomInfirmation(ServiceInstallerAppTitle, Text, "[CLASS:Button; INSTANCE:2]", "[CLASS:Static; INSTANCE:5]", "Customer Information", "[CLASS:Edit; INSTANCE:1]", "Raviraj", "[CLASS:Edit; INSTANCE:2]", "Infor"); IM.SelectFeatures(ServiceInstallerAppTitle, Text, "[CLASS:Button; INSTANCE:4]", "[CLASS:Static; INSTANCE:2]", "Select Features", "[CLASS:ISAVIEWCMPTCLASS; INSTANCE:1]", true); IM.WebSiteSelection(ServiceInstallerAppTitle, Text, "[CLASS:Button; INSTANCE:1]", "[CLASS:Static; INSTANCE:3]", "Web Site Selection"); IM.StartCopyingFile(ServiceInstallerAppTitle, Text, "[CLASS:Button; INSTANCE:1]", "[CLASS:Static; INSTANCE:4]", "Review settings before copying files."); IM.VirtualFoldersRemovalPopup("Question", Text, "[CLASS:Button; INSTANCE:1]", "[CLASS:Static; INSTANCE:2]", @"Setup has detected existing Virtual folder(s)"); IM.Winwait(ServiceInstallerAppTitle, "[CLASS:Static; INSTANCE:4]", "InstallShield Wizard Complete"); IM.InstallComplete(ServiceInstallerAppTitle, Text, "[CLASS:Button; INSTANCE:4]", "[CLASS:Static; INSTANCE:4]", "InstallShield Wizard Complete"); } else { //Uninstall Services //after remove btn click shows popup y/n //AutoServicesUninstaller servicesUninstaller = new AutoServicesUninstaller(); //servicesUninstaller.StartServicesUninstaller(); } } } }
public void StartServicesUninstaller() { //UM.isServiceInstallation = true; UM.RunServiceExe(Uninstallertitle, "[CLASS:Static; INSTANCE:10]", "Modify, repair, or remove the program.", AutoHelper.ServicesInstallerExe);//[CLASS:WindowsForms10.STATIC.app.0.141b42a_r6_ad1; INSTANCE:4] var processes = Process.GetProcesses(); foreach (var theProcess in processes) { if (theProcess.MainWindowTitle == Uninstallertitle) { if (AutoHelper.IsServicesInstalled() && !AutoHelper.IsAdapterInstalled()) { UM.SUWelcome(Uninstallertitle, "", "[CLASS:Button; INSTANCE:5]", "[CLASS:Static; INSTANCE:10]", "Modify, repair, or remove the program.", "[CLASS:Button; INSTANCE:3]"); UM.SUWarning1("Infor Risk & Compliance Services", "", "[CLASS:Button; INSTANCE:1]", "[CLASS:Static; INSTANCE:2]", "Wizard will start un-installation of Infor Risk & Compliance Services. Do you want to continue?"); UM.SUWaitPopup(Uninstallertitle, "[CLASS:Static; INSTANCE:2]", "Uninstall will remove Infor Risk & Compliance Core database.", "Infor Risk & Compliance Services"); UM.SUWarningDBBackup("Infor Risk & Compliance Services", "", "[CLASS:Button; INSTANCE:1]", "[CLASS:Static; INSTANCE:2]", @"Uninstall will remove Infor Risk & Compliance Core database."); UM.SUWaitPopup(Uninstallertitle, "[CLASS:Static; INSTANCE:2]", "Database is backed up with name", "Infor Risk & Compliance Services - InstallShield Wizard"); UM.SUWarningDBdeleted("Infor Risk & Compliance Services", "", "[CLASS:Button; INSTANCE:1]", "[CLASS:Static; INSTANCE:2]", "Database is backed up with name"); UM.SUWait(Uninstallertitle, "[CLASS:Static; INSTANCE:4]", "Maintenance Complete"); UM.SUCompleteuninstallation(Uninstallertitle, "", "[CLASS:Button; INSTANCE:4]", "[CLASS:Static; INSTANCE:4]", "Maintenance Complete", "[CLASS:Button; INSTANCE:2]"); } } } }