Implements basic look up algorithm to get product installations using registry keys
Наследование: IProductLookUp
Пример #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);
        }
Пример #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);
        }
Пример #3
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);
 }