Implements basic look up algorithm to get product installations using registry keys
Inheritance: IProductLookUp
Exemple #1
0
        public InstalledProduct(string installLocation, InstalledProductLookUp lookUp)
        {
            InstallLocation = installLocation;
            var corePath = lookUp.GetCoreFilePathFromInstallation(InstallLocation);

            VersionInfo   = lookUp.GetVersionInfoFromFile(corePath);
            ProductName   = string.Format("{0} {1}.{2}", lookUp.ProductLookUpName, VersionInfo.Item1, VersionInfo.Item2);
            VersionString = string.Format("{0}.{1}.{2}.{3}", VersionInfo.Item1, VersionInfo.Item2, VersionInfo.Item3, VersionInfo.Item4);
        }
Exemple #2
0
        public InstalledProduct(string installLocation, InstalledProductLookUp lookUp)
        {
            var corePath = lookUp.GetCoreFilePathFromInstallation(installLocation);

            InstallLocation = File.Exists(corePath) ? Path.GetDirectoryName(corePath) : installLocation;

            VersionInfo   = lookUp.GetVersionInfoFromFile(corePath);
            ProductName   = string.Format("{0} {1}.{2}", lookUp.ProductLookUpName, VersionInfo.Item1, VersionInfo.Item2);
            VersionString = string.Format("{0}.{1}.{2}.{3}", VersionInfo.Item1, VersionInfo.Item2, VersionInfo.Item3, VersionInfo.Item4);
        }
 public InstalledProduct(string installLocation, InstalledProductLookUp lookUp)
 {
     InstallLocation = installLocation;
     var corePath = lookUp.GetCoreFilePathFromInstallation(InstallLocation);
     VersionInfo = lookUp.GetVersionInfoFromFile(corePath);
     ProductName = string.Format("{0} {1}.{2}", lookUp.ProductLookUpName, VersionInfo.Item1, VersionInfo.Item2);
     VersionString = string.Format("{0}.{1}.{2}.{3}", VersionInfo.Item1, VersionInfo.Item2, VersionInfo.Item3, VersionInfo.Item4);
 }