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

0xc0000022 error was occured while opening wt.exe after v1.2.2381.0 #7974

Closed
EddieIvan01 opened this issue Oct 20, 2020 · 10 comments
Closed
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@EddieIvan01
Copy link

Environment

Windows build number: Microsoft Windows NT 10.0.18362.0
Windows Terminal version: After Windows Terminal v1.2.2381.0

Steps to reproduce

Start wt.exe from Run(Win+R)

Expected behavior

Windows Terminal runs

Actual behavior

0xc0000022 error was occured, it's similar to #7081

What's more

1

I have tested all the versions in release tab, versions after v1.2.2381.0 couldn't be started from Win+R properly:

  • Windows Terminal v1.2.2381.0
  • Windows Terminal Preview v1.3.2382.0
  • Windows Terminal v1.3.2651.0
  • Windows Terminal Preview v1.4.2652.0

Versions before Preview v1.2.2234.0 works properly

2

Start wt.exe from C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.4.2652.0_x64__8wekyb3d8bbwe\wt.exe, 0xc0000022 error was occured

Start wt.exe from C:\Users\USER\AppData\Local\Microsoft\WindowsApps\wt.exe, it's ok

Observe C:\Users\USER\AppData\Local\Microsoft\WindowsApps\wt.exe via WindowsMonitor, it loads C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.4.2652.0_x64__8wekyb3d8bbwe\wt.exe

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 20, 2020
@DHowett
Copy link
Member

DHowett commented Oct 20, 2020

You are not supposed to be running wt directly from the Program Files location. If that location is visible to you, and additionally on your PATH, you will want to reset the permissions on the Program Files\WindowsApps directory, as they have assuredly changed since you installed Windows.

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Oct 20, 2020
@EddieIvan01
Copy link
Author

Well, how could I reset the permissions on the Program Files\WindowsApps directory? I haven't change its permissions manually, and the error was occured after a Windows update

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Oct 20, 2020
@nascar3000
Copy link

Got same issue with Start\Run\wt.exe returns error; Application popup: wt.exe - Application Error : The application was unable to start correctly (0xc0000022). Click OK to close the application.

took Procmon and it shows ;
Process : Wt.exe
Class: File System
Operation: CreateFile
Result: ACCESS DENIED
Path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe\vcruntime140.dll

Seems NTFS permission are weird for vcruntime140.dll because there is conditional access defined for this file. Don't know if this intentional or accident.

@blakepell
Copy link

blakepell commented Oct 21, 2020

I'm having the same issue as of the last windows update (I get the same procmon access denied as well but I suspect that's a red herring). However, I did change permissions on those folders a month ago in order to delete almost 20 gigs of Candy Crush Saga, Candy Crush Friends, Bubble Witch Saga, March of Empires, Disney Magic Kingdoms, Autodesk Sketchbook that Windows keeps downloading (I was running out of space on my laptop and I couldn't find anyway to delete those apps through the Windows Store as I've never actually installed them, but I digress). Not only that, there appeared to be multiple versions of them.

I think @DHowett has identified the issue at least in my case. I believe the issue is because the Run dialog (or however you shell the app) is finding wt.exe in the path and trying to execute that executable (which is the same behavior UWP apps present when you find them in explorer and try to run them). Why it only started after the last Windows Update and not when I took permissions of the folders I don't know (perhaps the path changed in one of the updates). I also double checked that the alias for it was turned on and it was (perhaps if it finds it on the path it doesn't check the alias?).

Of course now that I'm looking I have more apps I didn't install new in the last month:

393MB: Hidden City Mystery of Shadows
207MB: Spotify
104MB: Dolby Access

@llkdsa
Copy link

llkdsa commented Oct 21, 2020

我也遇到了这个问题,不过已经解决了,步骤如下:

  1. 以管理员身份运行Windows Powershell
    2.运行还原权限命令 icacls "C:\Program Files\WindowsApps" /reset /t /c /q
    image
    3.win+ r 运行wt已经恢复正常了

@nascar3000

This comment has been minimized.

@DHowett
Copy link
Member

DHowett commented Oct 23, 2020

/dup #7188 for now -- I don't have any more good information ☹️

@ghost
Copy link

ghost commented Oct 23, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Oct 23, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements Needs-Attention The core contributors need to come back around and look at this ASAP. labels Oct 23, 2020
@dexeonify

This comment has been minimized.

@TheWhatis
Copy link

TheWhatis commented Oct 19, 2021

Just create file wte.bat (or other filename.bat), write in it
@echo off
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe
write a path your file in variable the PATH and open terminal from "run" with command wte (or other filename). ( Sorry for my English, I'm just starting to learn it XD )

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

7 participants