terminal
terminal copied to clipboard
Access Denied running wt.exe and failing to startup on boot
Windows Terminal version
1.18.3181.0
Windows build number
10.0.22631 Build 22631
Other Software
No response
Steps to reproduce
- Install WindowsTerminal.
- Crash Windows (video driver problem).
- WindowsApp folder has corrupt ACLs. Fix per knowledge MS base (takeown cacls) using MS support.
- All apps working fine except WindowsTerminal. Now getting "access denied" when attempting to execute "wt -w 0 nt --title "Java" -d %CD%"
- Re-install WindowsTerminal No change.
Expected Behavior
Open a new tab
Actual Behavior
Access Denied error message
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.
same issue occurring for me after update
WindowsApp folder has corrupt ACLs. Fix per knowledge MS base (takeown cacls) using MS support.
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
!
@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
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.
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