Пример #1
0
        /// <summary>
        /// Download the provider update package and install it
        /// </summary>
        public static bool Install(ProviderUpdateInfo providerInfo)
        {
            string tempFile = Path.GetTempFileName();

            try
            {
                // download the package
                Updaters.GetDataFile(providerInfo.UpdatePackageUrl, tempFile);

                // apply the downloaded package
                ApplyPackage(providerInfo, tempFile);

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
            finally
            {
                // delete downloaded package
                File.Delete(tempFile);
            }
        }