microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.28k stars 8.27k forks source link

Windows terminal Access denied even with wt #7171

Closed dinhanhx closed 4 years ago

dinhanhx commented 4 years ago

Environment

Microsoft Windows [Version 10.0.19041.421]
Windows terminal version: 1.1.2021.

Steps to reproduce

Download from Microsoft Store or from Microsoft.WindowsTerminal_1.1.2021.0_8wekyb3d8bbwe.msixbundle from Github

Click launch after installation

Expected behavior

The terminal shows up

Actual behavior

image

image

image

dinhanhx commented 4 years ago

So I have gone to this folder C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.1.2021.0_x64__8wekyb3d8bbwe then try double click on WindowsTerminal.exe and it works. But from other location, I couldn't

I have gone to this folder C:\Users\DinhAnh\AppData\Local\Microsoft\WindowsApps , and found out that wt.exe's size is 0 bytes. Double click and get the same error

dinhanhx commented 4 years ago

What I mean other locations such as Start Menu or Search

zadjii-msft commented 4 years ago

So the wt.exe in WindowsApps is an "app execution alias", which I believe is implemented as a "reparse point". It's basically just a symlink that points to the actual executable for the Terminal.

It's possible that there's some hang in the Store app somewhere that's causing this - as silly as it sounds, does this go away if you reboot?

dinhanhx commented 4 years ago

I rebooted my computer several time, wt.exe still doesn't work as expected. For WindowsTerminal.exe, I created a shortcut of it then I move that shortcut to start menu folder. Let call that WinTer. WinTer works fine from both Search and Start menu (obviously). But the shortcut of Microsoft Store for WindowsTerminal.exe (Windows Terminal) can not launch.

zadjii-msft commented 4 years ago

That's really bizarre.

Does this link from #6824 help by any chance?

dinhanhx commented 4 years ago

It seems you give wrong link. The correct link.

So I have tried to take ownership of these files and folders. They doesn't work at all. So I am trying to do the following:

===Update 3=== Updated "AppData" folder permission with "Replace all child object permission entries with inheritable permission entries from this object" and the problem is gone!!!!!

From the person who posted in the link

dinhanhx commented 4 years ago

@zadjii-msft It works. Thanks you sir.

zadjii-msft commented 4 years ago

Awesome, thanks for following up!

/dup #6824

ghost commented 4 years ago

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!

hrgdavor commented 3 years ago

For me all the above did not work, but I could run wt.exe after going into "execution aliases" and the uncheck and check again alias for wt.exe. clicking that repaired my wt.exe

mu88 commented 8 months ago

@zadjii-msft I'm encountering the same problem after installing Windows Terminal v1.18.3181 via Chocolatey on my fresh Win10 laptop (Version 22H2, OS build 19045.3803). I already tried fixing the permissions as described here, but unfortunately, that didn't solve the issue. As a temporary workaround, I'm using the portable version, but I'd really appreciate further help to solve this issue properly 🙏🏻