WSL 2
Silent install package for WSL 2
5.10.16-15
System and network
System and network
- package: tis-wsl2
- name: WSL 2
- version: 5.10.16-15
- categories: System and network
- maintainer: WAPT Team,Tranquil IT,Jimmy PELE
- locale: all
- target_os: windows
- architecture: all
- signature_date:
- size: 16.65 Mo
- homepage : https://docs.microsoft.com/windows/wsl/
package : tis-wsl2
version : 5.10.16-15
architecture : all
section : base
priority : optional
name : WSL 2
categories : System and network
maintainer : WAPT Team,Tranquil IT,Jimmy PELE
description : WSL 2 - Windows Subsystem for Linux 2
depends :
conflicts :
maturity : PROD
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 : e010c2e2-030e-401a-aa40-2dc41f6754b0
valid_from :
valid_until :
forced_install_on :
changelog : https://docs.microsoft.com/windows/wsl/release-notes
min_os_version :
max_os_version :
icon_sha256sum : 53955eb1cfa27f50eed20f11ea58e83c0e3b9349db59ce21120681cf4a5ad34c
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : wD/E3Bchsg1XyYc87uZeaRVxiBGshyPspFEspmUwGNhOuaihtlT6vQYh6bKxYup9IG2jqFd3mmOVblHwhZOs+cJADyHDz49EOUDFrYjUhRIdFn6+3vr6k6TWfzAW7/7xhs+/LmKP6KSArR7ldyO4USz/UNfdsnIg5X5RgDctVLbNgf1f/z6gF1utv4PUU3gezL2V6x7tyqseowy0RHfiV0263HbYn4xi0gR9qG3k4fLWbDksfNbeDctp/XmRCheyieKtuaDdE0IqW1aGRQ2Qj045M+1QoyREIzHlNrToEXBxb103F9La4+3Pn5qMNi06/RRNc1qRAjWqhojUroBuXQ==
signature_date : 2022-07-25T02:21:48.592060
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
# -*- 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
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_name = "wsl_update_x64.msi"
def install():
# Specific app values
app_name = control.name
# Installing the package
if windows_version() >= WindowsVersions.Windows10v1709:
with EnsureWUAUServRunning():
print("Enabling Windows Feature: Microsoft-Windows-Subsystem-Linux")
run_powershell("Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart -All")
# Updating WSL to WSL2
if windows_version() >= WindowsVersions.Windows10v2004:
# Installing the Kernel WSL Update if needed
install_msi_if_needed(bin_name)
try:
print("Enabling Windows Feature: VirtualMachinePlatform")
run_powershell("Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart -All")
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 2004 minimum for installing %s" % app_name)
else:
print("You need Windows 10 version 1709 minimum for installing WSL")
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 -*-
from setuphelpers import *
bin_name = "wsl_update_x64.msi"
url_dl = "https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi"
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
latest_bin = bin_name
# Downloading latest binaries
if isfile(latest_bin):
remove_file(latest_bin)
if not isfile(latest_bin):
print("Downloading: " + latest_bin)
wget(url_dl, latest_bin, proxies=proxies)
# Checking version from file
version = get_version_from_binary(latest_bin)
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
result = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
# control.set_software_version(version)
control.save_control_to_wapt()
89c864d5c2a5b7de496d13ee407e30457ba07f06e813bb57d092513ed62fd909 : setup.py
4d09c776c8d45f70a202281d18e19be1118f53159b0c217a5274a31ce18525fe : wsl_update_x64.msi
0d29bc570de2347495e37784d7de42542c309fa2d837435285f0120322bccbe5 : update_package.py
53955eb1cfa27f50eed20f11ea58e83c0e3b9349db59ce21120681cf4a5ad34c : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
058de17a9b0bd180be5927a344e8bb10b38a3abb91d7294455ffb61efe3302d6 : luti.json
6c29a295e7561268229f9af6897da4859efe1a28977486dc484f771768b7ff90 : WAPT/control