tis-powershell4

4.0-5
Windows Management Framework 4.0 including Powershell 4.0 for Windows 7 and Windows 8
603 downloads
Download

  Description 

  • package : tis-powershell4
  • version : 4.0-5
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Hubert TOUVET,Jimmy PELÉ
  • description : Windows Management Framework 4.0 including Powershell 4.0 for Windows 7 and Windows 8
  • locale :
  • target_os : windows
  • min_wapt_version : 1.5
  • sources : https://store.wapt.fr/store/tis-powershell4
  • installed_size :
  • impacted_process :
  • description_fr : Windows Management Framework 4.0 inclus Powershell 4.0 pour Windows 7 et Windows 8
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Microsoft
  • licence : MIT
  • signature_date : 2020-02-27T21:39:40.991927
  • Homepage : https://docs.microsoft.com/powershell/
  • Depends :

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

#https://docs.microsoft.com/powershell/scripting/install/installing-windows-powershell
#https://www.microsoft.com/download/details.aspx?id=40855

# Declaring specific app values (TO CHANGE)
bin_name_x64 = 'Windows6.1-KB2819745-x64-MultiPkg.msu'
bin_name_x86 = 'Windows6.1-KB2819745-x86-MultiPkg.msu'


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,'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Auto Update\\RebootRequired') or \
        reg_key_exists(HKEY_LOCAL_MACHINE,'SOFTWARE\\Microsoft\Windows\\CurrentVersion\\Component Based Servicing\\RebootPending') or \
        reg_key_exists(HKEY_LOCAL_MACHINE,'SOFTWARE\\Microsoft\\Updates\\UpdateExeVolatile'):
        return True
    return False


def install():
    with EnsureWUAUServRunning():
        if windows_version() == Version('6.1'):
            kb = 'KB2819745'
            if not is_kb_installed(kb):
                if iswin64():
                    msu = bin_name_x64
                else:
                    msu = bin_name_x86
                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 !')


def update_package():
    print('Update package content from upstream binary sources')

    # Getting proxy informations from WAPT settings
    proxy = {}
    if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}

    url_dl_x64 = ('https://download.microsoft.com/download/3/D/6/3D61D262-8549-4769-A660-230B67E15B25/Windows6.1-KB2819745-x64-MultiPkg.msu')
    url_dl_x86 = ('https://download.microsoft.com/download/3/D/6/3D61D262-8549-4769-A660-230B67E15B25/Windows6.1-KB2819745-x86-MultiPkg.msu')

    # Downloading latest binaries
    if not isfile(bin_name_x64):
        print('Downloading ' + bin_name_x64)
        wget(url_dl_x64,bin_name_x64,proxies=proxy)
    if not isfile(bin_name_x86):
        print('Downloading ' + bin_name_x86)
        wget(url_dl_x86,bin_name_x86,proxies=proxy)
    else:
        print ('This package is already up-to-date')


if __name__ == '__main__':
    update_package()


										

  Changelog 



https://www.microsoft.com/download/details.aspx?id=40855
									
  manifest.sha256