internal static string IsShunraInstalledFor(string productName) { var output = Html.ErrorMsg(); try { // Prepend Shunra NV for HP to the product name and convert to regex var regexString = @"Shunra\s*NV.*HP\s*" + productName.Replace(" ", @"\s*"); var regex = new Regex(regexString, RegexOptions.IgnoreCase); var p = InstalledProgramsHelper.GetInstalledProgramByName(regex); if (p != null) { output = Html.Yes; GetShunraProductDetails(p); } else { output = Html.No; } } catch (Exception ex) { Logger.Error(ex.ToString()); } return(output); }
public Agent() { try { var agentProduct = new MSIProgram("25A070105E2588740B2ED37C28A66094"); if (agentProduct.isInstalled) { isInstalled = true; name = agentProduct.DisplayName; version = agentProduct.DisplayVersion; installLocation = agentProduct.InstallLocation; installDate = agentProduct.InstallDate; } else //If the upgrade code does not exist or has changed we'll search Add/Remove programs { var server = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("HP Software Agent for Citrix")); if (server != null) { isInstalled = true; name = server.DisplayName; version = server.DisplayVersion; } } if (isInstalled) { GetTextDriverInfo(); } } catch (Exception ex) { Logger.Error(ex.ToString()); } }
public static string GetUFTInstallationInfo() { try { var qtpi = new QuickTestProInfo(); string output = "No"; if (qtpi.IsInstalled) { if (qtpi.ProductName.Contains("QC Integration")) { var qtp = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("HP Unified Functional Testing")); if (qtp != null) { output = "Yes, " + qtp.DisplayName + " " + qtp.DisplayVersion; } } else { output = Html.BoolToYesNo(qtpi.IsInstalled) + " " + qtpi.ProductName + " " + qtpi.ProductVersion + Helper.ConvertInstallDate(qtpi.InstallDate); } } return(output); } catch (Exception ex) { Logger.Error(ex.ToString()); return(Html.ErrorMsg()); } }
public static string GetBPMInstallationInfoFromUninstaller() { Logger.Info("GetBPMInstallationInfoFromUninstaller"); // Check if BPM is installed var bpm = InstalledProgramsHelper.GetInstalledProgramByName(new System.Text.RegularExpressions.Regex("HP Business Process Monitor")); if (bpm != null) { return(String.Format("Yes, {0} {1}", Html.B(bpm.DisplayName), bpm.DisplayVersion)); } return("No"); }
public static string GetALMPlatformLoaderInfo() { try { var almpl = InstalledProgramsHelper.GetInstalledProgramByName("ALM Platform Loader"); return((almpl != null) ? almpl.ToString() : "No"); } catch (Exception ex) { Logger.Error(ex.ToString()); return(Html.ErrorMsg()); } }
public static string GetFirefoxInfo() { try { InstalledProgram firefox = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("Firefox")); return(firefox == null ? "No" : "Yes, version " + firefox.DisplayVersion); } catch (Exception ex) { Logger.Error(ex.ToString()); return(Html.ErrorMsg()); } }
public static string GetGoogleChromeInfo() { try { InstalledProgram GoogleChrome = InstalledProgramsHelper.GetInstalledProgramByName("Google Chrome"); return(GoogleChrome == null ? "No" : "Yes, version " + GoogleChrome.DisplayVersion); } catch (Exception ex) { Logger.Error(ex.ToString()); return(Html.ErrorMsg()); } }
/// <summary> /// Method to check if a list of programs is installed /// </summary> /// <param name="names">List of strings - names of the programs</param> /// <returns>Returns a List<InstalledProgram></returns> public static List <InstalledProgram> GetInstalledProgramsByNames(List <string> names) { try { List <InstalledProgram> programs = new List <InstalledProgram>(); foreach (var programName in names) { var program = InstalledProgramsHelper.GetInstalledProgramByName(programName); if (program != null) { programs.Add(program); } } return(programs); } catch (Exception ex) { Logger.Error(ex.ToString()); return(null); } }
//public bool IsSupported = false; public Client() { try { // check if the new Citrix client exists (> 11.2) var ctrxClient = new MSIProgram("9B123F490B54521479D0EDD389BCACC1"); if (ctrxClient.isInstalled) { isInstalled = true; name = ctrxClient.DisplayName; version = ctrxClient.DisplayVersion; } else // check if the old Citrix client exists (<11.2) { ctrxClient = new MSIProgram("6D0FA3AFBC48DDC4897D9845832107CE"); // If still not found, try searching in Add/Remove programs if (ctrxClient.isInstalled) { name = ctrxClient.DisplayName; isInstalled = true; version = ctrxClient.DisplayVersion; } else { var client = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("citrix +receiver", RegexOptions.IgnoreCase)); if (client != null) { isInstalled = true; name = client.DisplayName; version = client.DisplayVersion; } } } } catch (Exception ex) { Logger.Error(ex.ToString()); } }
public Server() { var ctrxServer = new MSIProgram("140EC50CBD3676447B77F9BC0310C32A"); //If code does not exist we'll search Add/Remove programs if (ctrxServer.isInstalled) { isInstalled = true; name = ctrxServer.DisplayName; version = ctrxServer.DisplayVersion; } else { var server = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("[x|X]en[A|a]pp")); if (server != null) { isInstalled = true; name = server.DisplayName; version = server.DisplayVersion; } } }
public static string GetSecurityProductsInstalled(List <SecurityProduct> commonProducts) { StringBuilder output = new StringBuilder(); try { foreach (var product in commonProducts) { Logger.Debug("Searching for installed product: " + product.name); var program = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("^" + product.name + ".*", RegexOptions.IgnoreCase)); if (program != null) { output.Append(program.ToString()); output.Append(InstalledProgramsHelper.GetInfoForServices(product.services)); } } } catch (Exception ex) { Logger.Error(ex.ToString()); } return(output.Length > 0 ? output.ToString() : "Not detected"); }
internal static string GetJenkinsInfo() { StringBuilder output = new StringBuilder(); try { var jenkins = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("Jenkins")); if (jenkins != null) { output.Append(Html.Yes + ", " + jenkins.DisplayName + " " + jenkins.DisplayVersion); } else { output.Append(Html.No); } return(output.ToString()); } catch (Exception ex) { Logger.Error(ex.ToString()); return(Html.ErrorMsg()); } }
protected override void Collect() { string tabName = "Software Information"; AddDataPair(tabName, "Default browser", OSCollectorHelper.GetDefaultBrowser()); // Internet Explorer AddDataPair(tabName, "Internet Explorer version", OSCollectorHelper.GetIEVersion()); AddDataPair(tabName, "Internet Explorer Extensions" , Html.AddLinkToHiddenContent(DetectOtherSoftware.GetIEExtensions())); // Google Chrome AddDataPair(tabName, "Is Google Chrome installed?", DetectOtherSoftware.GetGoogleChromeInfo()); // Mozilla Firefox AddDataPair(tabName, "Is Mozilla Firefox installed?", DetectOtherSoftware.GetFirefoxInfo()); AddDataPair(tabName, "Is anti-virus software detected?", DetectSecuritySoftware.GetAntiVirusProgramsInstalled()); AddDataPair(tabName, "Is firewall software detected?", DetectSecuritySoftware.GetFirewallProgramsInstalled()); // Add the list of Windows Add/Remove Programs only if the menu is selected if (FormArguments.menuInstalledPrograms || FormArguments.details >= 3) { var listOfPrograms = InstalledProgramsHelper.ToList(); int count = InstalledProgramsHelper.installedProgramsList.Count; AddDataPair("Windows Add/Remove Programs", "Installed programs", count + " products found " + listOfPrograms); } if (FormArguments.menuWindowsUpdates || FormArguments.details >= 3) { AddDataPair("Windows Add/Remove Programs", "Installed Windows updates", InstalledProgramsHelper.GetWindowsUpdatesInfo()); } }
protected override void Collect() { var title = "HP Citrix Agent Information"; var ctrxAgent = new CitrixHelper.Agent(); AddDataPair(title, "Citrix Agent", ctrxAgent.ToString()); if (ctrxAgent.isInstalled) { AddDataPair(title, "Agent configuration", Html.AddLinkToHiddenContent(ctrxAgent.GetIniContentInfo())); AddDataPair(title, "Citrix registry keys", ctrxAgent.GetImptKeyContent()); AddDataPair(title, "Is text trapping driver installed?", Html.BoolToYesNo(ctrxAgent.isTextTrappingDriverInstalled) + ctrxAgent.textTrappingDriverVersion); if (ctrxAgent.isTextTrappingDriverInstalled) { AddDataPair(title, "Is text trapping driver signed?", ctrxAgent.driverSignedInfo); AddDataPair(title, "Text trapping driver state", ctrxAgent.textTrappingDriverState); } } //################ //RDP Role Detection //################ title = "HP RDP Agent Information"; //AddDataPair(title, "Is RDP access allowed?", DetectOtherSoftware.IsRDPAccessAllowedInfo()); AddDataPair(title, "Is RDP Role installed?", DetectOtherSoftware.IsRDPRollInstalledInfo()); AddDataPair(title, "HP RDP Agent", DetectOtherSoftware.RDPAgentInfo()); //############# //VTS DETECTION //############# Logger.Info("Collecting VTS information"); var vts = new VirtualTableServer(); title = "HP Virtual Table Server"; if (vts.IsInstalled) { AddDataPair(title, "Is VTS installed?", vts.GetProductNameVersionDateFormatted()); AddDataPair(title, "Details", vts.GetExecutableFilesInfo()); AddDataPair(title, "Service status", vts.GetVTSServiceInfo()); } else { var vts2 = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("[L|l]oad[R|r]unner - VTS")); var info = (vts2 != null) ? vts2.ToString() : "No"; AddDataPair(title, "Is VTS installed?", info); } //############# //LoadRunner Eclipse Add-in for Developers DETECTION //############# Logger.Info("Collecting LoadRunner Eclipse information"); title = "LoadRunner Eclipse Add-in for Developers"; var eclipsePlugin = InstalledProgramsHelper.GetInstalledProgramByName(new System.Text.RegularExpressions.Regex("LoadRunner Eclipse.*Developers")); if (eclipsePlugin != null) { AddDataPair(title, "Is Eclipse Add-in installed?", "Yes " + eclipsePlugin.DisplayName); AddDataPair(title, "Version", eclipsePlugin.DisplayVersion); AddDataPair(title, "Eclipse path", VuGenProperties.GetAttributeValue("Java.EclipseIdePath", "value", "Not found!")); } else { AddDataPair(title, "Is Add-in installed?", "No"); } //############# //LoadRunner Visual Studio 2012 Add-in for Developers DETECTION //############# Logger.Info("Collecting LoadRunner Eclipse information"); title = "LoadRunner Visual Studio Add-in for Developers"; var vsPlugin = InstalledProgramsHelper.GetInstalledProgramByName(new System.Text.RegularExpressions.Regex("LoadRunner Visual Studio 20[0-9]{2} Add")); string installed = vsPlugin != null ? Html.Yes + " " + vsPlugin.DisplayName + " version " + vsPlugin.DisplayVersion : Html.No; AddDataPair(title, "Is Add-in installed?", installed); //############# //BPM DETECTION //############# Logger.Info("Detecting BPM"); title = "HP Business Process Monitor"; var bpm = new BusinessProcessMonitorInfo(); //Logger.Info("BPM installation " + Html.Bool2Text(bpm.IsInstalled)); var bpmInstallInfo = (bpm.IsInstalled == true) ? bpm.GetProductNameVersionDateFormatted() : BusinessProcessMonitorInfo.GetBPMInstallationInfoFromUninstaller(); AddDataPair(title, "Is BPM installed?", bpmInstallInfo); if (bpm.IsInstalled == true || !bpmInstallInfo.Contains("No")) { AddDataPair(title, "Service status", BusinessProcessMonitorInfo.GetBPMServiceInfo()); AddDataPair(title, "BPM processes", Html.AddLinkToHiddenContent(BusinessProcessMonitorInfo.GetBPMProcessesInfo())); } //############# //ALM Platform Loader //############# if (FormArguments.details >= 2) { Logger.Info("Detecting ALM PL information"); AddDataPair("ALM Platform Loader", "Is ALM Platform Loader installed?", DetectOtherSoftware.GetALMPlatformLoaderInfo()); } //############# //QTP DETECTION //############# Logger.Info("Detecting UFT"); AddDataPair("HP Unified Functional Testing", "Is QTP/UFT installed?", DetectOtherSoftware.GetUFTInstallationInfo()); //############# //SITESCOPE DETECTION //############# if (FormArguments.details >= 2) { Logger.Info("Collecting SiteScope information"); AddDataPair("HP SiteScope", "Is SiteScope installed?", DetectOtherSoftware.GetSiteScopeInfo()); } }