Pacchetto "Aggiornamento cumulativo per .NET Framework per Windows 10, versione 1809 e Windows Server 2019"
Pubblicato: 18 settembre 2024 - 11:41
Buongiorno,
Ho appena creato un pacchetto per eseguire l'"Aggiornamento cumulativo per .NET Framework 3.5, 4.7.2 e 4.8 per Windows 10, versione 1809 e Windows Server 2019"
https://support.microsoft.com/fr-fr/top ... f09e30fcf3
Più specificamente, KB5042350 del 13 agosto 2024
Il file msu è diverso a seconda che si tratti di .NET Framework 4.8 o di una versione successiva.
Le versioni si trovano nel registro; maggiori informazioni su https://learn.microsoft.com/fr-fr/dotne ... -installato
Buona fortuna a tutti
Ho appena creato un pacchetto per eseguire l'"Aggiornamento cumulativo per .NET Framework 3.5, 4.7.2 e 4.8 per Windows 10, versione 1809 e Windows Server 2019"
https://support.microsoft.com/fr-fr/top ... f09e30fcf3
Più specificamente, KB5042350 del 13 agosto 2024
Il file msu è diverso a seconda che si tratti di .NET Framework 4.8 o di una versione successiva.
Le versioni si trovano nel registro; maggiori informazioni su https://learn.microsoft.com/fr-fr/dotne ... -installato
Buona fortuna a tutti
Codice: Seleziona tutto
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 !")