tis-kb4522355
1.1-3
Kb that solves the problem of displaying waptexit on windows 1903
1177 downloads

Description
- package : tis-kb4522355
- version : 1.1-3
- architecture : x64
- categories :
- maintainer : Simon Fonteneau, Alexandre Gauvrit
- description : Kb that solves the problem of displaying waptexit on windows 1903
- locale :
- target_os :
- min_wapt_version :
- sources :
- installed_size :
- impacted_process :
- description_fr : Kb qui résoud le problème d'affichage waptexit sur windows 1903
- description_pl :
- description_de :
- description_es :
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor :
- licence :
- signature_date : 2020-02-27T21:34:10.709447
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import re
uninstallkey = []
def is_kb_installed(hotfixid):
installed_update = installed_windows_updates()
if [kb for kb in installed_update if kb['HotFixID' ].upper() == hotfixid.upper()]:
return True
return False
def waiting_for_reboot():
# Query WUAU from the registry
if reg_key_exists(HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") or \
reg_key_exists(HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") or \
reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Updates\UpdateExeVolatile'):
return True
return False
def install():
with EnsureWUAUServRunning():
kb_files = [
'windows10.0-kb4522355-x64_af588d16a8fbb572b70c3b3bb34edee42d6a460b.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('Installing {}'.format(kb_file))
run('wusa.exe "{}" /quiet /norestart'.format(kb_file),accept_returncodes=[0,3010,2359302,-2145124329],timeout=3600)
else:
print('{} already installed'.format(kb_file))
if waiting_for_reboot():
print('A reboot is needed !')
def update_package():
print('Update package content from upstream binary sources')
from waptpackage import PackageEntry
latest_bin = "windows10.0-kb4522355-x64_af588d16a8fbb572b70c3b3bb34edee42d6a460b.msu"
realversion = "1.1"
# Get Proxy informations from WAPT settings
proxies = {}
if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
if proxywapt :
proxies = {'http':proxywapt,'https':proxywapt}
# Downloading latest binaires
if not isfile(latest_bin):
print('Download ' + latest_bin)
wget('http://download.windowsupdate.com/d/msdownload/update/software/updt/2019/10/windows10.0-kb4522355-x64_af588d16a8fbb572b70c3b3bb34edee42d6a460b.msu', latest_bin,proxies=proxies)
print ('Write ' + realversion + '-0 in WAPT\\control')
pe = PackageEntry()
pe.load_control_from_wapt(os.getcwd())
pe.version = realversion +'-0'
pe.save_control_to_wapt(os.getcwd())
print('The update is complete, you can now test and then launch a build upload.')
if __name__ == '__main__':
update_package()