tis-wsl2 icon

WSL 2

Paquet d'installation silencieuse pour WSL 2

2.7.12.0-18
System and network
System and network

Les paquets PREPROD sont des paquets construits via LUTI. Ils restent généralement 5 jours en PREPROD, après quoi un deuxième scan VirusTotal est effectué pour vérifier que le status n'a pas changé.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.

  • package: tis-wsl2
  • name: WSL 2
  • version: 2.7.12.0-18
  • categories: System and network
  • maintainer: WAPT Team,Tranquil IT,Joffrey Le Piquet
  • locale: all
  • target_os: windows
  • architecture: arm64
  • signature_date:
  • size: 257.05 Mo
  • homepage : https://docs.microsoft.com/windows/wsl/

package           : tis-wsl2
version           : 2.7.12.0-18
architecture      : arm64
section           : base
priority          : optional
name              : WSL 2
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Joffrey Le Piquet
description       : WSL 2 - Windows Subsystem for Linux 2
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : https://docs.microsoft.com/windows/wsl/
package_uuid      : 7e10b723-197a-4d71-b751-06894b3e6929
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://docs.microsoft.com/windows/wsl/release-notes
min_os_version    : 10.0.18362
max_os_version    : 
icon_sha256sum    : 53955eb1cfa27f50eed20f11ea58e83c0e3b9349db59ce21120681cf4a5ad34c
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-09-02T07:52:17.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : HiARjnFyl2EBt81UjkPyjeZTwni5tbCgBPVcx36kTSq09njj4k4Z9SoUNSiHmcVmtETHUtbz52hWJ6Dxhx0Jk3bjmgwYy75BlaPgc/NK1VLqoBGPa0/+ymubOOXcyzc9nCl20yE1lwDulQWuS8gXtK7EuWO2vbRkR5nODvhUAZ84hQGL8E0qXmBc8SlTE5IUhORQEzeTFGXprm6jlmGxr0TYKwDZVQB5h7hocFfQYuHzd8INnXjXQMVx5IeLF9W0uwHtX3scqokvR29Husor9mooJzvriyWAb1/sF3tBJuZeADPOLxVsjVuVYaRPWik0RzVm6V8n27Pbs5OitiRO7A==

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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

Installation procedure: https://docs.microsoft.com/windows/wsl/install-win10
Troobleshooting installation: https://docs.microsoft.com/windows/wsl/troubleshooting
Kernel Installation procedure: https://aka.ms/wsl2kernel
WSL2: https://aka.ms/wsl2-install

"""

def install():
    # Specific app values
    app_name = control.name
    bin_name = glob.glob("*.msi")[0]

    # Installing the package
    if windows_version() >= WindowsVersions.Windows10v1903:
        with EnsureWUAUServRunning():

            # Get previous state of WSL
            wsl = run_powershell("Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux")
            wsl_status = wsl.get("State") # State: Disable = 0, Enable = 2

            if wsl_status == 0:
                print("Enabling Windows Feature: Microsoft-Windows-Subsystem-Linux")
                run_powershell("Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart -All",output_format="text")

        # Updating WSL to WSL2
            # Installing the Kernel WSL Update if needed
            try:
                install_msi_if_needed(bin_name)
            except:
                print("INFO: A reboot is required to install %s" % bin_name)
                return

            try:
                print("Enabling Windows Feature: VirtualMachinePlatform")
                run_powershell("Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart -All",output_format="text")
            except:
                print("Unable to install %s, please reboot and make sure that virtualization is enabled in the BIOS" % app_name)

            try:
                print("Configuring %s as default" % app_name)
                run_powershell("wsl --set-default-version 2")
            except:
                print("Unable to configure %s as default" % app_name)

    else:
        print("You need Windows 10 version 1903 minimum for installing WSL 2")

    print("INFO: A reboot is required to use %s" % app_name)


def uninstall():
    # Uninstalling the package
    if windows_version() >= WindowsVersions.Windows10v1709:
        with EnsureWUAUServRunning():
            print("Disabling Windows Feature: Microsoft-Windows-Subsystem-Linux")
            run_powershell("Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart")
            if windows_version() >= "10.0.19041":
                print("Disabling Windows Feature: VirtualMachinePlatform")
                run_powershell("Disable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart")

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2024
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *

def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    api_url = "https://api.github.com/repos/microsoft/WSL/releases/latest"

    # Getting latest version information from official sources
    print(f"API used is: {api_url}")
    json_load = json.loads(wgets(api_url, proxies=proxies))
    for asset in json_load["assets"]:
        if asset["name"].endswith("arm64.msi"):
            download_url = asset["browser_download_url"]
            version = json_load["tag_name"]
            latest_bin = asset["name"]
            break

    print(f"Latest version of {control.name} is: {version}")
    print("Download URL is: %s" % download_url)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print(f"Software version updated (from: {control.get_software_version()} to: {Version(version)})")
        package_updated = True
    else:
        print(f"Software version up-to-date ({Version(version)})")

    # Deleting binaries
    for f in glob.glob("*.msi"):
        if f != latest_bin:
            remove_file(f)

    version = get_version_from_binary(latest_bin)
    control.set_software_version(version)
    control.save_control_to_wapt()
    return package_updated

01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
3a707cd15f4c2b525e576662457bb65238022de268daf7304baf126bc7479829 : WAPT/control
53955eb1cfa27f50eed20f11ea58e83c0e3b9349db59ce21120681cf4a5ad34c : WAPT/icon.png
1c95a506c1b8c670b7d5ce00210ae826ce0df7da9d26dc54e55085fa8eef6430 : luti.json
66e16e2db3871df94d16776c3acb06f93ec5d60e15dfd78fbc9c56a6a8e0fae0 : setup.py
695a93c4b50db520f81ff0ee053caa82599de340398501448015d2d54662cf90 : update_package.py
1035d7870ed6155b56fef6966b22ece5cb8cacacbea1561140a066111b3e962d : wsl.2.7.12.0.arm64.msi