Error 0x80070003 after manually installing/uninstalling when launching bash.exe
-
Your Windows build number:
- Microsoft Windows [version 10.0.17134.112]
-
What you're doing and what's happening:
Everything have been running on an elevated cmd/powershell.
- I manually installed WSL without Windows Store with this answer on SO (it was a really bad idea).
bash.exeworking well at the moment (created a user and apt-get update)- Tried to uninstall it with
lxrun /uninstall /full. - Throw an error
0x80070003for uninstall, as well when I startbash.exe. - Deleted all files related to Ubuntu/Canonical stuff.
After that, I tried to install it with lxrun in hope to get rid of the error:
lxrun /install /y: installation ok, didn't asked for the creation of a user.bash.exestill broken but works fine when I startBash on Ubuntu on Windowsfrom Start Menu.
I think something messed up from the beginning when I tried to manually install WSL and now my installation is semi-broken.
I restarted my computer between some tasks and also tried to restart LxssManager service.
-
What's wrong / what should be happening instead:
bash.exeshould run WSL properly and not giveError 0x80070003
use wslconfig /u <distro-name> to uninstall that distro. And delete this registry Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss.
I don't recommend manually deleting any registry state.
So, I have done what @Biswa96 said, now when I run bash I don't get the error anymore but instead ask me to download WSL. Seems to be OK.
However, when I run lxrun /uninstall /y or lxrun /uninstall /full /y I got an error 80070002. Of course I restarted the computer after doing Biswa's steps.
Is this intended since I have uninstalled WSL Ubuntu? Or should I clean something else before installing WSL Ubuntu with lxrun?
@TotomInc OK, let me elaborate the problem. The error 0x80070003 may mean that the path where you've installed Ubuntu is not present/deleted/removed. There is a second answer in that SO question, written by me.
LxRun.exe /uninstall may only work with legacy installation i.e. LxRun.exe /install. So DON'T use it. Instead use the following procedure. Restart the LxssManager service if you want.
Download the Appx/ZIP file as you did it before. Delete the registry path (as I said before) IF AND ONLY IF there is no other distro installed. Extract Ubuntu.exe and install.tar.gz in a folder path, for example, C:\MyFiles\Ubuntu. Run this command as administrator:
icacls "C:\MyFiles\Ubuntu" /grant Everyone:(OI)(CI)(F)
Now run ubuntu.exe as administrator and it will be installed. And use wslconfig.exe /u Ubuntu to uninstall it.
Thanks @Biswa96 it works well.
Hello
PS C:\Users\shahj\Downloads\Ubuntu-16.04> wslconfig.exe
Performs administrative operations on Windows Subsystem for Linux
Usage:
/l, /list [/all] - Lists registered distributions.
/all - Optionally list all distributions, including distributions that
are currently being installed or uninstalled.
/s, /setdefault <DistributionName> - Sets the specified distribution as the default.
/u, /unregister <DistributionName> - Unregisters a distribution.
I first got a list of all the Windows Subsystems for Linux currently installed on the machine:
PS C:\Users\batman\Downloads\Ubuntu-16.04> wslconfig.exe /l
Windows Subsystem for Linux Distributions:
Ubuntu-18.04 (Default)
Ubuntu
I then deleted them both:
PS C:\Users\batman\Downloads\Ubuntu-16.04> wslconfig.exe /u Ubuntu
Unregistering...
PS C:\Users\batman\Downloads\Ubuntu-16.04> wslconfig.exe /l
Windows Subsystem for Linux Distributions:
Ubuntu-18.04 (Default)
PS C:\Users\batman\Downloads\Ubuntu-16.04> wslconfig.exe /u Ubuntu-18.04
Unregistering...
Ensured there were no existing subsystems:
PS C:\Users\batman\Downloads\Ubuntu-16.04> wslconfig.exe /l
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Windows Store:
https://aka.ms/wslstore
PS C:\Users\batman\Downloads\Ubuntu-16.04>
And I was up and running again!
Just re-installed the Windows Subsystem for Linux again.
Note: You may also get Error 0x80070003 if your domain has configured McAfee to block loading of WSL. (You'd think there would be a nice, clear message, but you just get Error 0x80070003 and you have go dig through the event log to discover the policy.)
This is not a bug in WSL -- but it is a common explanation for Error 0x80070003 in the corporate environment.
Note: You may also get Error 0x80070003 if your domain has configured McAfee to block loading of WSL. (You'd think there would be a nice, clear message, but you just get Error 0x80070003 and you have go dig through the event log to discover the policy.)
This is not a bug in WSL -- but it is a common explanation for Error 0x80070003 in the corporate environment.
No, No McAfee only windows solution