terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Windows Terminal does not start -> errors in console and GUI (Dialog with "Wrong parameter")

Open torric opened this issue 3 years ago • 5 comments

Windows Terminal version

1.15.2874.0

Windows build number

10.0.19044.2251

Other Software

No response

Steps to reproduce

I have installed Windows Terminal with winget successfully. winget install Microsoft.WindowsTerminal

Try to start Windows Terminal from start menu or from console with wt.

Alias for app execution is set for Terminal / wt.exe.

Expected Behavior

Windows Terminal opens.

Actual Behavior

Click on Terminal in start menu -> Nothing happens

Normal user:

  • Powershell: wt <Enter>
ResourceUnavailable: Program 'wt.exe' failed to run: An error occurred trying to start process 'C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\wt.exe' with working directory 'C:\Users\<username>'. Falscher Parameter.At line:1 char:1
+ wt
+ ~~.

Admin:

  • Powershell: wt <Enter>
Fehler beim Ausführen des Programms "wt.exe": Falscher ParameterIn Zeile:1 Zeichen:1
+ wt
+ ~~.
In Zeile:1 Zeichen:1
+ wt
+ ~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

Normal user or Admin: Starting from

C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\wt.exe

→ Dialog: "Falscher Parameter" (= Wrong parameter)

I have done a Windows 10 21H2 inplace upgrade and reinstalled Windows Terminal afterwards. Did not help.

torric avatar Nov 10 '22 22:11 torric

Hmm. You're on 1.15.2874, so you've already got the fix for #14104.

We might need an app launch trace, to forward to the MSIX activation folks to take a look. I don't recall what that path is off the top of my head, something like "app activation" (instead of "terminal", which the bot is about to recommend): /feedback

zadjii-msft avatar Nov 11 '22 15:11 zadjii-msft

Hi there!

Can you please send us feedback with the Feedback Hub with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?

Thanks!

image

image

image

ghost avatar Nov 11 '22 15:11 ghost

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar Nov 15 '22 16:11 ghost

The Feedback Hub is deactivated on my PC. I can start the Windows Terminal app when I assign read and execution right to the folder "C:\Program Files\WindowsApps" for the specific administrator and non-administrator user and inherit them to sub folders.

I have the following findings for both users:

  1. Starting link "Terminal" from start menu does not work.
  2. Starting from start menu by typing "wt" works.
  3. Starting from cmd or PowerShell with "wt" does not work.
  4. Starting from an alternative file explorer by "wt" works.

It seems to have to do with the rights settings. The assigned groups (administrators, users) are not enough.

torric avatar Nov 20 '22 22:11 torric

when I assign read and execution right to the folder "C:\Program Files\WindowsApps

Do NOT mess with WindowsApps. Last time someone was messing with those on this repo, they had to reinstall Windows. Watch out.

I'm curious if the wt that's being launched is the same thing. I bet in one case, you're triggering the app execution alias, and in the other, you're running the actual binary (from WindowsApps, which should not be run directly).

You_ should be able to do a where wt in Command Prompt, but idk if you can do the same thing effectively from the Run Dialog, without somehow invoking CMD itself.

zadjii-msft avatar Nov 21 '22 12:11 zadjii-msft

I had the same question, but now I solved it! The reason is that I moved the directory "%username%/AppData/LocalLow" to "D:/AppData/LocalLow" using a tool named "freemove" to save space on the C disk. This tool creates a symbolic link on "%username%/AppData/LocalLow" pointing to "D:/AppData/LocalLow." When I deleted the symbolic link, everything was repaired.

goodbey857 avatar Dec 22 '23 14:12 goodbey857

I had the same question, but now I solved it! The reason is that I moved the directory "%username%/AppData/LocalLow" to "D:/AppData/LocalLow" using a tool named "freemove" to save space on the C disk. This tool creates a symbolic link on "%username%/AppData/LocalLow" pointing to "D:/AppData/LocalLow." When I deleted the symbolic link, everything was repaired.

I wish I had seen your reply this morning. I encountered the same situation. Here is what happened:

I installed a fresh copy of Windows 10 22H2 19045.3803 (I also tried LTSC 2021). I wanted to move the %APPDATA% directory to another disk where I store my personal data, so I created a symbolic link in safe mode:

MOVE C:\User\USERNAME\AppData\Roaming D:\Roaming MKLINK /D C:\User\USERNAME\AppData\Roaming D:\Roaming

After rebooting, all the normal Win32 exe applications, pre-installed UWP applications, and Portable format Windows Terminal(wt) downloaded from the Release section worked fine.

When I used winget (I also tried msstore, with the same result) to install wt and nanazip, after the installation, launching wt from the Start menu showed an "Invalid parameter" error, and the same happened with nanazip. I noticed that they are both Win32 UWP Desktop Bridge applications.

So I started looking for the cause and restored the symbolic link directory:

RMDIR C:\User\USERNAME\AppData\Roaming ROBOCOPY D:\Roaming C:\User\USERNAME\AppData\Roaming /MIR

After rebooting, everything was back to normal.

Therefore, I suspect that this issue may be related to a bug in the Desktop Bridge file API because other types of applications can open normally. I don't know where to report this issue, so I opened this issue hoping that Microsoft developers will take notice of this bug.

If someone encounters the same problem, I hope they can also take note of it and not spend as much time troubleshooting as I did. At first, I even thought it was a problem with the LTSC system, so I even reinstalled the system.

xxnuo avatar Jan 07 '24 09:01 xxnuo