Support Forum: Get Support for Patch My PC Products and Services

Microsoft Configuration Manager and Intune (Enterprises/Paid) => Support and General Questions (Enterprises Using ConfigMgr and Intune) => Topic started by: muja1913 on September 13, 2024, 04:33:42 AM

Title: How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"
Post by: muja1913 on September 13, 2024, 04:33:42 AM
HI,

I want to know in "Windows Subsystem for Linux (MSI-x64)" application does it set the WSL version to 2 while installing or we need to use the additional argument for this?

If we need to use the additional argument, can you please share me how i must include the command.

Thanks,
Muja
Title: Re: How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"
Post by: Liviu (Patch My PC) on September 13, 2024, 05:06:16 AM
Hello muja1913,

The version of WSL we currently support is 2.2.4.0.
You can see that by right-clicking on the software in Patch My PC --> Show Package Info.
Title: Re: How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"
Post by: muja1913 on September 13, 2024, 07:00:51 AM
Hi,

What i actually need is do i need to set the default WSL version to Version 2 after installing this or will it be set to wsl version = 2 when i install the app via PMPC.

Command used to set the default version = wsl --set-default-version 2

Thanks,
Muja
Title: Re: How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"
Post by: Liviu (Patch My PC) on September 13, 2024, 07:19:56 AM
Apologies for misunderstanding your initial ask.

You are correct, the argument you found in the meantime is the right one.
Linking the MS doc, in case it's needed by anyone else too.
https://learn.microsoft.com/en-us/windows/wsl/basic-commands#set-default-wsl-version (https://learn.microsoft.com/en-us/windows/wsl/basic-commands#set-default-wsl-version)
Title: Re: How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"
Post by: muja1913 on September 19, 2024, 11:44:24 PM
Hi

Noted and it didn't work for me when I added this so can you share me a screenshot of how to add this argument in PMPC?

Thanks,
Muja
Title: Re: How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"
Post by: Liviu (Patch My PC) on September 22, 2024, 11:45:45 PM
hey Muja,

You can right-click on "Windows Subsystem for Linux (MSI-x64) and choose the "Modify Command Line" right-click option.
(https://ibb.co/q5ssqR6)

Depending in which platform our tool is packaging the software, a republish might be necessary.
Please see this KB article for more details:
https://patchmypc.com/when-and-how-to-republish-third-party-updates (https://patchmypc.com/when-and-how-to-republish-third-party-updates)
Title: Re: How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"
Post by: PS_Alex on September 23, 2024, 09:48:49 AM
Quick suggestion here?
Install or update WSL as-is from Patch My PC on a test device, then run the wsl --set-default-version 2 command from within PsExec launched in the SYSTEM context. See if it does configure WSL to version 2.

I don't have a lot of experience with WSL, but I'm wondering if WSL's version is configured per-device or per-user? If the latter, and the wsl --set-default-version... command does nothing under PsExec, that may explain why adding it as a post-install/post-update script has no effect.