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

Install fails at Enable-WindowsOptionalFeature step #3413

Closed
maphew opened this issue Jul 26, 2018 · 10 comments
Closed

Install fails at Enable-WindowsOptionalFeature step #3413

maphew opened this issue Jul 26, 2018 · 10 comments
Labels
install Failure to install

Comments

@maphew
Copy link

maphew commented Jul 26, 2018

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.17134.48]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

Following instructions at https://docs.microsoft.com/en-ca/windows/wsl/install-win10 I pasted Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux into an administrator powershell console.

A "running" progress indicator appears but stays at 0% for some minutes, then fails with:

Enable-WindowsOptionalFeature : DismInitialize failed. Error code = 0x80004005
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

I rebooted and tried again, same results.

  • What's wrong / what should be happening instead:

Progress meter progressing to 100% then a prompt to reboot computer OR meaningful error message on why it couldn't complete.

  • Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).
strace -o Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux`
strace : The term 'strace' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ strace -o Enable-WindowsOptionalFeature -Online -FeatureName Microsof ...
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (strace:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
@benhillis
Copy link
Member

@maphew - Could you share you CBS.log file?

C:\windows\logs\cbs\CBS.log

@maphew
Copy link
Author

maphew commented Jul 26, 2018

In a bit @benhillis. I tried another route, which I'll post about after lunch, which I think may have worked. Right now I get The process cannot access the file because it is being used by another process.

@maphew
Copy link
Author

maphew commented Jul 26, 2018

After reading https://stackoverflow.com/questions/41078822/get-windowsoptionalfeature-failing-to-work I tried running Get-WindowsOptionalFeature -Online. It failed in a similar fashion to Enable, a very long pause and then an error.

Somewhere I saw reference to a GUI method via the system control panel and tried that, which seems to have worked. Start >> Windows Features >> Turn Windows Features on or off >> checkbox 'Windows Subsystem for Linux'. There was a progress bar and then prompt for reboot.

After that I opened Windows Store and selected Ubuntu. On opening it I was told "This product is installed" and then a console window opened saying "Installing, this may take a few minutes...". A bit later I was prompted to create UNIX name and password. Now Ubuntu shows in Start app list and opens a bash shell. Yay!

I then re-attempted powershell Get-WindowsOptionalFeature -Online which immediately returned many screen fulls of FeatureName : xxxx and State : Enabled or State : Disabled.

2018-07-26 12_42_21-windows error 1921 - 0x80070781 - the name of the file cannot be resolved by the

2018-07-26 12_43_21-windows features

2018-07-26 12_50_29-window

@maphew
Copy link
Author

maphew commented Jul 26, 2018

Logfile attached:
CBS.log

@KennySydney
Copy link

Hi Maphew
is this issue sorted? I have the same problem. Running windows 10 home ver 1803 OS build 17134.191

@maphew
Copy link
Author

maphew commented Aug 6, 2018 via email

@klabacher
Copy link

Im even can install wsl i getting error 0x800f0922.

@yamenshahin
Copy link

Run PowerShell as administrator

@shkell
Copy link

shkell commented Feb 21, 2022

I got this same error attempting to run the

Enable-WindowsOptionalFeature

from guide attempting to turn on Hyper-V here: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v

I was running Powershell in Administrator mode.

I couldn't turn on all the Hyper-V features via settings under this heading: Enable the Hyper-V role through Settings

It worked for me when I followed the steps under the heading: Enable Hyper-V with CMD and DISM

This turned on the Hyper-V settings I was expecting it to. This is not exactly specific to the issue in the OP but the same error brought me here, so this may help someone else out in the future

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Failure to install
Projects
None yet
Development

No branches or pull requests

7 participants