tis-powershell3 3.0.0-4

  • package : tis-powershell3
  • version : 3.0.0-4
  • architecture : all
  • locale :
  • description : Powershell 3.0 management framework KB2506146
  • maintainer : Hubert TOUVET
  • date : 2018-02-27 19:06:50
  • min_os_version : 6.0
  • max_os_version :
  • Depends :

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():
    if windows_version() < Version('6.1'):
        kb = 'KB2506146'
        if not is_kb_installed(kb):
            if iswin64():
                msu = 'Windows6.0-KB2506146-x64.msu'
            else:
                msu = 'Windows6.0-KB2506146-x86.msu'
            run('wusa.exe "{}" /quiet /norestart'.format(msu),accept_returncodes=[0,3010,2359302],timeout=3600)
            print('reboot needed')
        else:
            print('{} already installed'.format(kb))
    else:
        kb = 'KB2506143'
        if not is_kb_installed(kb):
            if iswin64():
                msu = 'Windows6.1-KB2506143-x64.msu'
            else:
                msu = 'Windows6.1-KB2506143-x86.msu'
            run('wusa.exe "{}" /quiet /norestart'.format(msu),accept_returncodes=[0,3010,2359302],timeout=3600)
            print('reboot needed')
        else:
            print('{} already installed'.format(kb))

    if waiting_for_reboot():
        print('A reboot is needed !')


    

Changelog

No changelog
    

manifest.sha256

WAPT/certificate.crt 79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4
WAPT/wapt.psproj 795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b
Windows6.0-KB2506146-x86.msu 3ff9d23c1d56113690635a3c2397434a144ab90f4753eba44001583605de17ce
Windows6.1-KB2506143-x86.msu 2a23cb68bc87675c8ec7c7bfdfbb7f99262b69163bc7db7edc76ac1fb436a16e
Windows6.1-KB2506143-x64.msu 8a8e35fa0e613fcc54644b8336d7dabbe5c6b57a1895e9caac2d0065746d1f8d
Windows6.0-KB2506146-x64.msu 8af5cd1fb937afdebf0c8401686f1fc1674f8fc8d5d47d7865aa894c66bccd3e
setup.py 6024fc707762d5da7a393839a8b6aae00dcfb893802e9e73aaef34b86530fbbe
WAPT/control 6bebff1772a9635803b0e894212d5d872a2ea0baae1076d45be2e6405ec1f3a1