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

Closed
opened 2026-01-31 02:38:05 +00:00 by claunia · 10 comments
Owner

Originally created by @EddieIvan01 on GitHub (Oct 20, 2020).

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

Originally created by @EddieIvan01 on GitHub (Oct 20, 2020). # Environment ```none 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`
claunia added the Resolution-Duplicate label 2026-01-31 02:38:05 +00:00
Author
Owner

@DHowett commented on GitHub (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 commented on GitHub (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.
Author
Owner

@EddieIvan01 commented on GitHub (Oct 20, 2020):

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

@EddieIvan01 commented on GitHub (Oct 20, 2020): 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
Author
Owner

@nascar3000 commented on GitHub (Oct 20, 2020):

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.

@nascar3000 commented on GitHub (Oct 20, 2020): 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.
Author
Owner

@blakepell commented on GitHub (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

@blakepell commented on GitHub (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
Author
Owner

@llkdsa commented on GitHub (Oct 21, 2020):

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

  1. 以管理员身份运行Windows Powershell
    2.运行还原权限命令 icacls "C:\Program Files\WindowsApps" /reset /t /c /q
    image
    3.win+ r 运行wt已经恢复正常了
@llkdsa commented on GitHub (Oct 21, 2020): 我也遇到了这个问题,不过已经解决了,步骤如下: 1. 以管理员身份运行Windows Powershell 2.运行还原权限命令 `icacls "C:\Program Files\WindowsApps" /reset /t /c /q` ![image](https://user-images.githubusercontent.com/20829574/96675664-f9ff8d80-139d-11eb-9bed-357d6c592c6a.png) 3.win+ r 运行wt已经恢复正常了
Author
Owner

@nascar3000 commented on GitHub (Oct 21, 2020):

Just taking ownership and granting read/execute permission to "Users" for single file "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe\vcruntime140.dll" fixed issue for me. No need to mess with whole WindowsApps folder permissions

@nascar3000 commented on GitHub (Oct 21, 2020): Just taking ownership and granting read/execute permission to "Users" for single file "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe\vcruntime140.dll" fixed issue for me. No need to mess with whole WindowsApps folder permissions
Author
Owner

@DHowett commented on GitHub (Oct 23, 2020):

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

@DHowett commented on GitHub (Oct 23, 2020): /dup #7188 for now -- I don't have any more good information ☹️
Author
Owner

@ghost commented on GitHub (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 commented on GitHub (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!
Author
Owner

@dexeonify commented on GitHub (Oct 25, 2020):

Just taking ownership and granting read/execute permission to "Users" for single file "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe\vcruntime140.dll" fixed issue for me. No need to mess with whole WindowsApps folder permissions

Thanks! That worked.

@dexeonify commented on GitHub (Oct 25, 2020): > Just taking ownership and granting read/execute permission to "Users" for single file "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe\vcruntime140.dll" fixed issue for me. No need to mess with whole WindowsApps folder permissions Thanks! That worked.
Author
Owner

@TheWhatis commented on GitHub (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 )

@TheWhatis commented on GitHub (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 )
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11078