Package "Cumulative Update for .NET Framework for Windows 10, version 1809 and Windows Server 2019"
Published: September 18, 2024 - 11:41
Good morning,
I just created a package to perform the "Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows 10, version 1809 and Windows Server 2019"
https://support.microsoft.com/fr-fr/top ... f09e30fcf3
More specifically, KB5042350 dated August 13, 2024
Depending on whether it's .NET Framework 4.8 or later, the msu file is different.
The versions can be found in the registry; more information on https://learn.microsoft.com/fr-fr/dotne ... -installed
Best of luck to everyone
I just created a package to perform the "Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows 10, version 1809 and Windows Server 2019"
https://support.microsoft.com/fr-fr/top ... f09e30fcf3
More specifically, KB5042350 dated August 13, 2024
Depending on whether it's .NET Framework 4.8 or later, the msu file is different.
The versions can be found in the registry; more information on https://learn.microsoft.com/fr-fr/dotne ... -installed
Best of luck to everyone
Code: Select all
from setuphelpers import *
import re
r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
def install():
with EnsureWUAUServRunning():
# Choix du MSU en fonction du .NET Framework
if registry_readstring(HKEY_LOCAL_MACHINE,'SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full','Release') >= '528040' :
# .NET Framework 4.8 ou plus
kb_files = [
'windows10.0-kb5041974-x64-ndp48_e8660214346c8ac124e2f99aa21eef697fff307d',
]
else:
# .NET Framework 3.5 à 4.7.2
kb_files = [
'windows10.0-kb5041913-x64_b00cd2de1915f11b56c21d7001962f67854afe07.msu',
]
for kb_file in kb_files:
kb_guess = re.findall(r'^.*-(KB.*)-',kb_file)
if not kb_guess or not is_kb_installed(kb_guess[0]):
print("Installation de {}".format(kb_file))
run('wusa.exe "{}" /quiet /norestart'.format(kb_file), accept_returncodes=[0, 3010, 2359302, -2145124329], timeout=1800)
else:
print("{} est déjà installé".format(kb_file))
if is_pending_reboot():
print("Un redémarrage est nécessaire !")