microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.25k stars 812 forks source link

Windows Store installed Ubuntu fails to launch - Invalid parameter (french canadian) #2577

Open domtoupin opened 6 years ago

domtoupin commented 6 years ago

Microsoft Windows [version 10.0.16299.19]

I just installed the Windows 10 Fall Creator Update and I was thrilled at the fact that I could install Ubuntu.

However, all my attempts resulted in the following error: From the UI (attempt to launch from Windows Store, I simply Ctrl-C, Ctrl-V the Dialog box here)

[Window Title]
C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc\ubuntu.exe

[Content]
C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc\ubuntu.exe

Paramètre incorrect.

[OK]

Power Shell (both as regular user and as administrator)

PS C:\WINDOWS\system32> ubuntu install
Le programme « ubuntu.exe » n’a pas pu s’exécuter : Paramètre incorrectAu caractère Ligne:1 : 1
+ ubuntu install
+ ~~~~~~~~~~~~~~.
Au caractère Ligne:1 : 1
+ ubuntu install
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

(Sorry for the french...)

What I did was this:

I am now out ouf ideas...

439bananas commented 4 years ago

Can reproduce for Debian as well. ^^

Bary commented 4 years ago

I did a shortcut on my desktop of ubuntu.exe file from problematic path and no problem. Runing it from Start menu is still the problem.

Natfan commented 3 years ago

I feel like it's pretty clear that the issue here is spaces within the ubuntuXXXX.exe path.

On my machine, the program installs to C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuXX.XXonWindows_XXXX.XXXX.XXX.X_x64\ubuntuXXXX.exe

When running the ubuntuXXXX.exe from that location, I received the same error as everyone else in this thread: The parameter is incorrect.

When moving the folder to C:\ubuntu instead, the program successfully installs and runs:

nat@pc:~pwsh> C:\ubuntu\ubuntu2004.exe
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: nat
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
...
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 4.4.0-18362-Microsoft x86_64)
...
nat@pc:~$

There is clearly an issue with how the package deals with spaces within it's path. I would recommend either properly quoting the string as it is passed around the application, or ensuring that all spaces are preceded with the escape character to resolve this issue.

omesur commented 2 years ago

I followed the steps (manual installation steps) on this site and solved the problem: https://docs.microsoft.com/en-us/windows/wsl/install-win10

ghost commented 10 months ago

Is there any fix for this now? Can anyone give some solid advice and guidelines how to overcome it?