From 2e679dbf5ee7b00e14f632c50bb9f5645f851943 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 17 Mar 2019 18:11:36 -0600 Subject: [PATCH] Download stand alone Windows update installers * Fixes issue #91 (again) --- .bin/Scripts/functions/update.py | 16 ++++++++++++++++ .bin/Scripts/settings/sources.py | 17 +++++++++++++++++ .bin/Scripts/update_kit.py | 1 + 3 files changed, 34 insertions(+) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index adb26c6d..1ff66160 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -67,6 +67,22 @@ def download_to_temp(out_name, source_url): download_generic(global_vars['TmpDir'], out_name, source_url) +def download_windows_updates(): + """Download stand alone Windows Update installers.""" + # Prep + dest = r'{}\Installers\Extras\Windows Updates'.format( + global_vars['BaseDir']) + + + # Download + for kb, v in WINDOWS_UPDATE_SOURCES.items(): + for winver, v2 in v.items(): + for arch, url in v2.items(): + name = 'KB{}-Windows{}-x{}.msu'.format(kb, winver, arch) + if not os.path.exists(r'{}\{}'.format(dest, name): + download_generic(dest, name, url) + + def extract_generic(source, dest, mode='x', sz_args=[]): """Extract a file to a destination.""" cmd = [ diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index e39a8e9d..29a8c66e 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -197,6 +197,23 @@ RST_SOURCES = { #SetupRST_16.7.exe : Deprecated by Intel 'SetupRST_16.8.exe': 'https://downloadmirror.intel.com/28400/eng/SetupRST.exe', } +WINDOWS_UPDATE_SOURCES = { + '2999226': { + # https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows + '7': { + '32': 'https://download.microsoft.com/download/4/F/E/4FE73868-5EDD-4B47-8B33-CE1BB7B2B16A/Windows6.1-KB2999226-x86.msu', + '64': 'https://download.microsoft.com/download/1/1/5/11565A9A-EA09-4F0A-A57E-520D5D138140/Windows6.1-KB2999226-x64.msu', + }, + '8': { + '32': 'https://download.microsoft.com/download/1/E/8/1E8AFE90-5217-464D-9292-7D0B95A56CE4/Windows8-RT-KB2999226-x86.msu', + '64': 'https://download.microsoft.com/download/A/C/1/AC15393F-A6E6-469B-B222-C44B3BB6ECCC/Windows8-RT-KB2999226-x64.msu', + }, + '8.1': { + '32': 'https://download.microsoft.com/download/E/4/6/E4694323-8290-4A08-82DB-81F2EB9452C2/Windows8.1-KB2999226-x86.msu', + '64': 'https://download.microsoft.com/download/9/6/F/96FD0525-3DDF-423D-8845-5F92F4A6883E/Windows8.1-KB2999226-x64.msu', + }, + }, + } if __name__ == '__main__': diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 18bbb69e..15b3162e 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -60,6 +60,7 @@ if __name__ == '__main__': try_and_print(message='Macs Fan Control...', function=update_macs_fan_control, other_results=other_results, width=40) try_and_print(message='MS Office...', function=update_office, other_results=other_results, width=40) try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40) + try_and_print(message='Windows Updates...', function=download_windows_updates, other_results=other_results, width=40) update_all_ninite(other_results=other_results, width=40) # Misc