Access Denied running wt.exe and failing to startup on boot #21180

Closed
opened 2026-01-31 07:35:34 +00:00 by claunia · 6 comments
Owner

Originally created by @n614cd on GitHub (Feb 1, 2024).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.22631 Build 22631

Other Software

No response

Steps to reproduce

  1. Install WindowsTerminal.
  2. Crash Windows (video driver problem).
  3. WindowsApp folder has corrupt ACLs. Fix per knowledge MS base (takeown cacls) using MS support.
  4. All apps working fine except WindowsTerminal. Now getting "access denied" when attempting to execute "wt -w 0 nt --title "Java" -d %CD%"
  5. Re-install WindowsTerminal No change.

Expected Behavior

Open a new tab

Actual Behavior

Access Denied error message

Originally created by @n614cd on GitHub (Feb 1, 2024). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.22631 Build 22631 ### Other Software _No response_ ### Steps to reproduce 1. Install WindowsTerminal. 2. Crash Windows (video driver problem). 3. WindowsApp folder has corrupt ACLs. Fix per knowledge MS base (takeown cacls) using MS support. 4. All apps working fine except WindowsTerminal. Now getting "access denied" when attempting to execute "wt -w 0 nt --title "Java" -d %CD%" 5. Re-install WindowsTerminal No change. ### Expected Behavior Open a new tab ### Actual Behavior Access Denied error message
claunia added the Resolution-By-DesignNeeds-TriageIssue-BugCulprit-Centennial labels 2026-01-31 07:35:34 +00:00
Author
Owner

@n614cd commented on GitHub (Feb 1, 2024):

I managed to get WindowsTerminal to work correctly. But he issue points to something likely being left behind somewhere when uninstalling/reinstalling.
If I enable "Terminal" in the Startup Apps. I get access denied in the terminal; but the terminal opens.
If I run the WindowsTerminal application via the start menu. Nothing happens. Task Manager briefly shows the app starting and then it disappears.
If I run "wt" via the start bar, everything works as expected.

Note: There are multiple names in play. Terminal, WindowsTerminal and wt.

@n614cd commented on GitHub (Feb 1, 2024): I managed to get WindowsTerminal to work correctly. But he issue points to something likely being left behind somewhere when uninstalling/reinstalling. If I enable "Terminal" in the Startup Apps. I get access denied in the terminal; but the terminal opens. If I run the WindowsTerminal application via the start menu. Nothing happens. Task Manager briefly shows the app starting and then it disappears. If I run "wt" via the start bar, everything works as expected. Note: There are multiple names in play. Terminal, WindowsTerminal and wt.
Author
Owner

@adham-elaraby commented on GitHub (Feb 1, 2024):

same issue occurring for me after update

@adham-elaraby commented on GitHub (Feb 1, 2024): same issue occurring for me after update
Author
Owner

@zadjii-msft commented on GitHub (Feb 2, 2024):

WindowsApp folder has corrupt ACLs. Fix per knowledge MS base (takeown cacls) using MS support.

image

Literally any time someone does this, it's unfixable. It's going to seriously mess up your system.

A small recent sample:

For example, in this case: the OS specifically hits an Access Denied the first time it tries to open ...WindowsApps/.../wt.exe, and that access denied actually lets the OS know to do the right thing and re-try the exe as a packaged application (which then does work). If you instead grant permissions to wt.exe, then the first E_ACCESSDENIED never happens, and you get into all sorts of undefined behavior.

NEVER mess with the permissions anywhere on WindowsApps!

@zadjii-msft commented on GitHub (Feb 2, 2024): > WindowsApp folder has corrupt ACLs. Fix per knowledge MS base (takeown cacls) using MS support. ![image](https://github.com/microsoft/terminal/assets/18356694/455349b7-5bc4-4339-a2b3-80be16d9a414) Literally any time someone does this, it's unfixable. It's going to seriously mess up your system. A small recent sample: * https://github.com/microsoft/terminal/issues/13622#issuecomment-1202718325 * https://github.com/microsoft/terminal/discussions/13511 * https://github.com/microsoft/terminal/issues/16419#issuecomment-1839009663 For example, in this case: the OS specifically hits an Access Denied the first time it tries to open `...WindowsApps/.../wt.exe`, and that access denied actually lets the OS know to do the _right_ thing and re-try the exe as a packaged application (which then _does_ work). If you instead grant permissions to wt.exe, then the first E_ACCESSDENIED never happens, and you get into all sorts of undefined behavior. # NEVER mess with the permissions anywhere on `WindowsApps`!
Author
Owner

@n614cd commented on GitHub (Feb 2, 2024):

@zadjii-msft

Well, in this case, I did what I was told too by MS Support. After a series of power failures that took out my UPS, I had corrupt ACLs on the WindowsApps folder.

What do you think is the correct way to fix ACLs when they are showing as corrupt?

Tim

@n614cd commented on GitHub (Feb 2, 2024): @zadjii-msft Well, in this case, I did what I was told too by MS Support. After a series of power failures that took out my UPS, I had corrupt ACLs on the WindowsApps folder. What do you think is the correct way to fix ACLs when they are showing as corrupt? Tim
Author
Owner

@zadjii-msft commented on GitHub (Feb 2, 2024):

I honestly don't know. What I do know, is to never ever ever touch them. I've only ever heard of folks having to straight-up reinstall Windows to fix it.

@zadjii-msft commented on GitHub (Feb 2, 2024): I honestly don't know. What I do know, is to never ever _ever_ touch them. I've only ever heard of folks having to straight-up reinstall Windows to fix it.
Author
Owner

@adham-elaraby commented on GitHub (Feb 2, 2024):

Yeah, I also had to learn this the hard way, for now just running the portable version of Windows Terminal, and reinstalled all my WSL distros

@adham-elaraby commented on GitHub (Feb 2, 2024): Yeah, I also had to learn this the hard way, for now just running the portable version of Windows Terminal, and reinstalled all my WSL distros
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21180