Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after wsl --update: wsl and wslconfig /list return "%1 is not a valid Win32-Application." both give errorcode 0x800700c1 #9678

Closed
1 of 2 tasks
amentler opened this issue Feb 23, 2023 · 25 comments
Assignees
Labels
bug needs-investigation likely actionable and/or needs more investigation

Comments

@amentler
Copy link

amentler commented Feb 23, 2023

Version

10.0.19044.2604

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

not certain. commands are not working. after (see my comment) it says 5.10.16

Distro Version

Ubuntu

Other Software

No response

Repro Steps

i think the last i did before the error occured was to try to wsl --update -d ubuntu but i am not shure.

Expected Behavior

the commands wsl or wslconfig should do something except throwing the error

Actual Behavior

wsl throws the error
"%1 ist keine zulässige Win32-Anwendung.
Error code: Wsl/0x800700c1"

wslconfig /list throws
"%1 ist keine zulässige Win32-Anwendung.
Error code: WslConfig/0x800700c1"

that translates to "%1 is not a valid Win32-Application."

if i only input "wslconfig" i get the list of parameters.

i already tried to uninstall/install the subsystem (by control panel and also by powershell commands). i tried sfc scannow and dism /online /cleanup-image /restorehealth.
i tried uninstalling ubuntu and docker and reinstalling ubuntu and ubuntu 22.04.2 lts.
i tried setting lxss to automatic and starting it manually.
i tried reinstalling some windows wsl patch that was showing in my control panel/software
i tried looking into procmon output.
currently im trying to install windows 11 to see if that works.
of course i restarted multiple times between that.
last thing i did was to reset and repaired the newly installed wsl and ubuntu under apps&features. but i yet have to restart to try if that helped.

Diagnostic Logs

WslLogs-2023-02-23_13-16-21.zip

@amentler
Copy link
Author

amentler commented Feb 23, 2023

ok, uninstalled everything. then i looked into apps&features and the control panel and there wasnt a trace of subsystem, any update, ubuntu, linux or docker. then the wsl command worked.
then i tried a wsl --update which lead to that exception.
i uninstalled everything.

then i did wsl --install -d ubuntu. that worked. then i updated wsl with the update from https://aka.ms/wsl2kernel. now ubuntu is running.

i think as soon as i do a wsl --update i will destroy my wsl again. so i am not going to do that.

@amentler amentler changed the title wsl and wslconfig /list return "%1 is not a valid Win32-Application." both give errorcode 0x800700c1 after wsl --update: wsl and wslconfig /list return "%1 is not a valid Win32-Application." both give errorcode 0x800700c1 Feb 23, 2023
@imckh
Copy link

imckh commented Mar 5, 2023

same.
First wsl --update worked, then try again, failed.

C:\WINDOWS\system32>wsl --update
正在安装: 适用于 Linux 的 Windows 子系统
已安装 适用于 Linux 的 Windows 子系统。

C:\WINDOWS\system32>wsl --update
%1 不是有效的 Win32 应用程序。
Error code: Wsl/0x800700c1

@ghost
Copy link

ghost commented Mar 7, 2023

Were /logs being collected while attempting the update command? I don't see much in the logs.

@ghost ghost added the needs-author-feedback label Mar 7, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

@2exd
Copy link

2exd commented Mar 17, 2023

same. First wsl --update worked, then try again, failed.

C:\WINDOWS\system32>wsl --update
正在安装: 适用于 Linux 的 Windows 子系统
已安装 适用于 Linux 的 Windows 子系统。

C:\WINDOWS\system32>wsl --update
%1 不是有效的 Win32 应用程序。
Error code: Wsl/0x800700c1

Did you fix it? I also encountered the same problem.

@imckh
Copy link

imckh commented Mar 17, 2023

Not fixed, avoided.

Uninstall everything related to wsl and reinstall it.
NEVER execute wsl --update!

@imckh
Copy link

imckh commented Mar 17, 2023

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

Sorry, my PC degraded to win10 and everything has been cleared.

@amentler
Copy link
Author

Were /logs being collected while attempting the update command? I don't see much in the logs.

i collected the logs a few days after attempting the update. it could be that i collected them even after trying other unsuccessful repair attempts.
thing is that i currently am not willing to try to do an update again since the last repair took me quite some time and i need the wsl in a functioning state for work. if i try another update some time later this year i might remember to collect data with the script.
i am sorry that i can not be of any more help right now but it cost me too much time already and i am very happy that a complete uninstall/reinstall while avoiding that update command worked for me.

@dogukan6durukan
Copy link

The path you followed actually worked fine for me. I was dealing with the 0x800700c1 error for 2 days while tending to install WSL.
I am in Windows 11 and on my last try, I completely deleted all the subsystem traces, and worked. However, I don't have any concrete idea of why this error is appearing.

@benhillis benhillis added bug needs-investigation likely actionable and/or needs more investigation labels Apr 11, 2023
@benhillis benhillis self-assigned this Apr 11, 2023
@JohenanLi
Copy link

I want to use wsl --export command to export my images, but it doesn't work like before.:(

@JohenanLi
Copy link

I understand now. I uninstalled all of WSL and re-enabled the Windows Subsystem for Linux feature. If I don't upgrade or install the upgrade package directly, I can use it normally. This indicates that the upgraded version of WSL is not compatible with the current system.

@ferruzoft
Copy link

ferruzoft commented Apr 17, 2023

I've got same error when I tried to install a distribution

image

image

@hurricanedjp
Copy link

uninstall the Mircrosoft store app wsl(Windows Subsystem for Linux) and app ubuntu 20.04, then reinstall, it works

@JohenanLi
Copy link

@benhillis
I have discovered the reason for the occurrence of this bug. After upgrading WSL, it automatically disables Hyper-V. Therefore, all you need to do is enable the Hyper-V feature and restart. This is my solution. WSL team, please take a look at why the upgrade automatically disables Hyper-V.

@dogukan6durukan
Copy link

I have discovered the reason for the occurrence of this bug. After upgrading WSL, it automatically disables Hyper-V. Therefore, all you need to do is enable the Hyper-V feature and restart. This is my solution. WSL team, please take a look at why the upgrade automatically disables Hyper-V.

How did you find out that Windows disables Hyper-v? Any error or something..?

@JohenanLi
Copy link

I have discovered the reason for the occurrence of this bug. After upgrading WSL, it automatically disables Hyper-V. Therefore, all you need to do is enable the Hyper-V feature and restart. This is my solution. WSL team, please take a look at why the upgrade automatically disables Hyper-V.

How did you find out that Windows disables Hyper-v? Any error or something..?

I discovered that Hyper-V was disabled because when I encountered the same error, I followed the previous solution by attempting to disable WSL and remove Ubuntu and Kali from the "optional features." However, I noticed that Hyper-V was disabled as a result. Therefore, I speculated that this might be the reason behind it, as the error message contained "CreateVm," which could be related to Hyper-V. After enabling it again, everything returned to normal.

@OneBlue
Copy link
Collaborator

OneBlue commented Jun 13, 2023

Fixed with 1.3.10

@OneBlue OneBlue closed this as completed Jun 13, 2023
@Sublime1
Copy link

Fixed with 1.3.10

Hi @OneBlue great to hear there's a fix for this, as I'm currently experiencing this error when installing as a non-Admin user.
Is there a workaround in the meantime while we wait for 1.3.10 to be available? Or is there a way to get our hands on pre-releases?

thanks!

@OneBlue
Copy link
Collaborator

OneBlue commented Jun 21, 2023

@Sublime1: Yes. wsl --update --pre-release will download the latest build

@Sublime1
Copy link

@Sublime1: Yes. wsl --update --pre-release will download the latest build

Thank you so much! I can confirm this finally fixed my issue (which was installing WSL for non-admin users).

@Enrice
Copy link

Enrice commented Oct 6, 2023

now it's more broken than ever.
I tried

@Sublime1: Yes. wsl --update --pre-release will download the latest build

it reported to be upgrading to 2.0.4, now there is not a single option that doesn't give me:
%1 ist keine zulässige Win32-Anwendung. Error code: Wsl/CallMsi/0x800700c1

Maybe no wonder: Each .exe in <..>/AppData\Local\Microsoft\WindowsApps has 0 KB...:
image

could this be reopened?

@LbISS
Copy link

LbISS commented Nov 22, 2023

I had the same issue. I have tried to disable all features, uninstall/install WSL from Store and from command line, etc - nothing helped. Then 1 thing which actually helped:
I have cleaned up everything and installed WSL 2.0.9 from here https://github.com/microsoft/WSL/releases as .msi package instead of Store version - and it has started to work.

Also, if you're using Docker Desktop - reset it to the factory defaults and on init be careful about autoupdate of WSL. Probably it's better to not use recommended settings and set it to "update WSL2 manually".

@mqy1237
Copy link

mqy1237 commented Mar 20, 2024

hi guys,try this if it says "not a valid Win32-Application":

Delete the file which name is "Program" in the C drive

@StanF98
Copy link

StanF98 commented Apr 29, 2024

hi guys,try this if it says "not a valid Win32-Application":

Delete the file which name is "Program" in the C drive

This Works. Hopefully It doesnt Destroy anything else. Do you have an idea what is contained in the file?

@mqy1237
Copy link

mqy1237 commented Apr 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-investigation likely actionable and/or needs more investigation
Projects
None yet
Development

No branches or pull requests