tis-windows10-upgrade-data

10.0.19041-53
Windows 10 Upgrade Data
2307 downloads
Download

  Description 

  • package : tis-windows10-upgrade-data
  • version : 10.0.19041-53
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Alexandre Gauvrit
  • description : Windows 10 Upgrade Data
  • locale :
  • target_os : windows
  • min_wapt_version : 1.8.2
  • sources : https://www.microsoft.com/en-us/software-download/windows10
  • installed_size : 5037415680
  • impacted_process :
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor :
  • licence :
  • signature_date : 2020-06-17T16:37:02.720000

  Setup.py 

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

uninstallkey = []

# If you do not plan to copy the ISO in the package please verify thoses values
bin_name = "MediaCreationTool2004.exe" # Change the 4 digits with the latest Windows 10 version
Arch = "x64"
Edition = "Professionnal"
Lang = "fr-FR"


def install():
    # Declaring specific app values
    package_version = control.version.split('-')[0]
    windows_latest = package_version
    upgrade_path = makepath(systemdrive,'WindowsUpgrade')
    iso_path = makepath(basedir,'iso')

    # Copyings files
    if Version(windows_version()) < Version(windows_latest):
        print("Free disk space : %d bytes" % get_disk_free_space(systemdrive))
        if isdir(upgrade_path):
            remove_tree(upgrade_path)
        if get_disk_free_space(systemdrive) < 6000000000 :
            error("Not enough free space for copying upgrade data, please cleanup")
        else:
            print('Creating %s for Win10 %s' % (upgrade_path,windows_latest))
            mkdirs(upgrade_path)
            copytree2(iso_path,upgrade_path)


def update_package():
    '''
    Method 1:
    1- Place your desired Windows 10 ISO in the package and run the update_package function
    2- Build-upload the package

    Method 2:
    1- Run the update_package function to Launch the Microsoft MediaCreationToolxxxx and Download the latest Windows 10 iso file (save it in the package)
    2- Build-upload the package
    '''

    # Ignore your auto-builder
    if get_hostname().split('.')[0].lower() == 'slavejenkins-w7':
        return 0

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

    # Specific app values
    iso_path = makepath(basedir,'iso')
    setup_path = makepath(iso_path,'setup.exe')
    package_version = control.version.split('-')[0]

    # Check if the extracted ISO is older
    if isfile(setup_path):
        actual_iso_version = get_file_properties(setup_path)['ProductVersion']
        if actual_iso_version < package_version:
            remove_tree(iso_path)
            mkdirs(iso_path)
    else:
        if not isdir(iso_path):
            mkdirs(iso_path)

    # Detect if ISO placed
    iso_used = False
    for iso_in_dir in glob.glob('*.iso'):
        if isfile(iso_in_dir):
            iso_used = True

    # Downloading latest MediaCreationTool if needed
    if not isfile(bin_name) and not iso_used:
        print("Downloading {}".format(bin_name))
        wget("https://software-download.microsoft.com/download/pr/{}".format(bin_name),bin_name,proxies=proxy)

    # Using MediaCreationTool for generating an ISO
    if isfile(bin_name) and not iso_used:
        run('{} /Eula Accept /MediaLangCode {} /Retail /MediaArch {} /MediaEdition {}'.format(bin_name,Lang,Arch,Edition),timeout=5000)

    # Extracting ISO
    sevenzip_path = makepath(programfiles,'7-Zip','7z.exe')
    for iso_in_dir in glob.glob('*.iso'):
        print('Extracting: ' + iso_in_dir)
        run('"%s" x %s -o%s' % (sevenzip_path,iso_in_dir,iso_path))
        remove_file(iso_in_dir)

    # Change version of the package
    version_from_file = get_file_properties(setup_path)['ProductVersion']
    version_split = version_from_file.split('.')
    version = '%s.%s.%s' % (package_version_split[0],package_version_split[1],package_version_split[2])

    pe = PackageEntry().load_control_from_wapt('.')
    pe.version = '%s-%s'%(version,int(pe.version.split('-',1)[1])+1)
    pe.save_control_to_wapt('.')
    print('Changing version to ' + pe.version + ' in WAPT\\control')
    print('Update package done. You can now build-upload your package')


										

  Changelog 



No changelog.txt.
									
  manifest.sha256