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

Can't run Windows Terminal without Administrator #13197

Open
LoganDark opened this issue May 29, 2022 · 26 comments
Open

Can't run Windows Terminal without Administrator #13197

LoganDark opened this issue May 29, 2022 · 26 comments
Labels
Culprit-Centennial Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@LoganDark
Copy link

LoganDark commented May 29, 2022

Windows Terminal version

1.13.11431.0

Windows build number

10.0.19041.572

Yes, this has actually downgraded since my last bug report. Blame the fact that I had limited download options.

Other Software

No response

Steps to reproduce

See #13099 (comment) and the comments leading up to it.

  1. I was given a command that completely ruined every app on my system.
  2. I had to do an in-place upgrade to fix the issue.
  3. Windows Terminal, through any amount of reinstalls, now cannot run without Administrator.

Expected Behavior

No response

Actual Behavior

Windows Terminal, through any amount of reinstalls, now cannot run without Administrator. I also cannot double-click the msixbundle to install (I get some permission error), but Add-AppxPackage works.

The wt command is not found in a non-Administrator Command Prompt, but it is found in an Administrator Command Prompt.

No Start Menu entries work for any part of Windows Terminal, not even the shortcuts, unless run as Administrator.

@LoganDark LoganDark added the Issue-Bug It either shouldn't be doing this or needs an investigation. label May 29, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 29, 2022
@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Jun 6, 2022
@lonnywong
Copy link
Contributor

I reset UAC and reboot, and it works for me.

@LoganDark
Copy link
Author

I reset UAC and reboot, and it works for me.

What do you mean "reset UAC"?

Do you mean turning this slider to the very bottom?

image

@lonnywong
Copy link
Contributor

"reset" means I didn't change the level.

Mine is "Never notify", I click it, and then click "OK", and then it said I need to reboot. It works after reboot.

Btw, I change the level to default, and reboot again, it works too.

@LoganDark
Copy link
Author

"reset" means I didn't change the level.

That's a weird way to use the words, but OK.

Mine is "Never notify"

Well, I don't want to nullify all security on my computer. There's a reason UAC exists.

@lonnywong
Copy link
Contributor

lonnywong commented Jun 10, 2022

I'm using the default level, and it works.

I think you can set it to any level, just set it again. Click it to make it saying you need to restart the computer.

@lonnywong
Copy link
Contributor

lonnywong commented Jun 10, 2022

  1. open the UAC.
  2. click the level. No matter which level you are using, and you don't need to change it, just click it.
  3. Click OK. You should getting "restart the computer".
  4. Reboot the computer. It should work.

@LoganDark
Copy link
Author

3. You should getting "restart the computer".

I'm actually not for some reason? I can change the level all I want without restarting. Even completely disable it and re-enable it again and the changes apply instantly (i.e. it's not asking me to reboot). Should I just reboot anyway after messing with it?

@lonnywong
Copy link
Contributor

It must be a bug.
I can't reproduce it now. Maybe you should try to reboot anyway.

@LoganDark
Copy link
Author

Rebooted my computer again, still can't open Windows Terminal without administrator. :/

@lonnywong
Copy link
Contributor

Sorry for not helping.
I have the same issue before, and happened to solve it yesterday.

@zadjii-msft
Copy link
Member

<meta discussion>

We need a better way of reporting these issues to the appx team - We simply don't have the debugging knowhow to investigate these properly.

@zadjii-msft zadjii-msft added Culprit-Centennial Needs-Discussion Something that requires a team discussion before we can proceed labels Jun 23, 2022
@Trugamr
Copy link

Trugamr commented Jun 25, 2022

Make sure in settings.json, profile settings don't have elevate: true setting.

@LoganDark
Copy link
Author

Make sure in settings.json, profile settings don't have elevate: true setting.

There is no elevate anywhere in my settings.json

@LoganDark LoganDark reopened this Jun 25, 2022
@LoganDark
Copy link
Author

woah, I have no idea how that got clicked, I used ctrl+enter to comment

@JonathanPitre
Copy link

Same issue here when I run Terminal (Admin) with a non-admin account and input my admin creds.
Even with the Terminal Preview version,

Is this being looked into? This a fresh build of Windows 11 22H2.

@LoganDark
Copy link
Author

LoganDark commented Nov 2, 2022

Okay, does this have something to do with it?

image

I guess this must've happened when I reinstalled Windows. Except... from an admin command prompt.. it is still 0 bytes and yet executes just fine

image

Huh?!

image

@zadjii-msft
Copy link
Member

@LoganDark Nope, those are App Execution Aliases, which are reparse points, which the OS does a really bad job of telling you what they mean. pwsh is at least a little better

@LoganDark
Copy link
Author

@LoganDark Nope, those are App Execution Aliases, which are reparse points, which the OS does a really bad job of telling you what they mean. pwsh is at least a little better

Is there any way to figure out why non-administrators cannot execute them?

@zadjii-msft
Copy link
Member

why non-administrators cannot execute them?

I mean, the reparse point isn't an executable itself. It's just like, a symlink, that points at the actual exe. Trick is, that AEA's for Store apps point at an exe on the filesystem that has super restricted permissions, such that even admins can't execute it normally. However, there's a magic handoff in CreateProcess that knows how to delegate the creation of a packaged process to the right set of ACLs. It's a process I don't fully understand, to be totally honest. That magic lets apps run with special store-granted permissions only, but from the user context it seems like nothing weird happened

It's definitely weird, though, that you can't run the Terminal without admin permissions. That's unexpected. Does that repro for any other Store apps? Like, maybe Ubuntu.exe? (I'm sure there are plenty of other Store apps that are "centennial" apps that request the normal level of permissions)

@LoganDark
Copy link
Author

I mean, the reparse point isn't an executable itself. It's just like, a symlink, that points at the actual exe.

Yeah, I understand what you mean. You still execute them in order to do the reparse magic, though.

It's definitely weird, though, that you can't run the Terminal without admin permissions. That's unexpected. Does that repro for any other Store apps? Like, maybe Ubuntu.exe? (I'm sure there are plenty of other Store apps that are "centennial" apps that request the normal level of permissions)

The python.exe standin that opens the Microsoft Store also only works from an admin command prompt. App Installer also does not work without being granted admin, so for example, I can't double-click appxbundles to install, I have to use Add-AppxPackage.

However, since the in-place reinstall, built-in apps like Alarms & Clock or Calendar work just fine.

@zadjii-msft
Copy link
Member

The python.exe standin that opens the Microsoft Store also only works from an admin command prompt ... built-in apps like Alarms & Clock or Calendar work just fine.

Okay yea this is definitely a Centennial issue then. Alarms&Clock, Calendar, Calculator - these are all apps that run in an app container. That's fundamentally different than Terminal, Python, WSL distros, etc, which do not have an app container.

We need to connect you up with someone on the appx/msix/deployment team to help investigate this, cause this is definitely not something we (the Terminal team) are equipped to debug.

@LoganDark
Copy link
Author

The python.exe standin that opens the Microsoft Store also only works from an admin command prompt ... built-in apps like Alarms & Clock or Calendar work just fine.

Okay yea this is definitely a Centennial issue then. Alarms&Clock, Calendar, Calculator - these are all apps that run in an app container. That's fundamentally different than Terminal, Python, WSL distros, etc, which do not have an app container.

So far I haven't had any issues with accessing WSL, either through Windows Terminal (as admin), bash.exe (WSL 2), or ubuntu2004.exe (WSL 1).

We need to connect you up with someone on the appx/msix/deployment team to help investigate this, cause this is definitely not something we (the Terminal team) are equipped to debug.

I would definitely appreciate that very much, thank you! My email can be found on my GitHub profile. You're welcome to have someone contact me, and if we can find a solution I'll make sure to post it here.

@maidamai0
Copy link

Make sure in settings.json, profile settings don't have elevate: true setting.

There is no elevate anywhere in my settings.json

there are two settings, one for user and one for default, do you check all of them?

@LoganDark
Copy link
Author

Make sure in settings.json, profile settings don't have elevate: true setting.

There is no elevate anywhere in my settings.json

there are two settings, one for user and one for default, do you check all of them?

This isn't the issue because running wt.exe directly raises this error

image

@carlos-zamora carlos-zamora removed the Needs-Discussion Something that requires a team discussion before we can proceed label Jan 17, 2023
@spufidoo
Copy link

spufidoo commented Jul 5, 2023

I have the same issue - I cannot start Windows Terminal outside of Administrator Mode, whether it's
Window Terminal Version 1.18.1462.0, or Windows Terminal Preview Version: 1.18.1462.0, which is a real pain.
I've just uninstalled both, rebooted, and downloaded Windows Terminal Version: 1.17.11461.0 from the Store - still runs in Admin mode by default.

@carlos-zamora carlos-zamora added this to the Backlog milestone Aug 9, 2023
@carlos-zamora carlos-zamora added Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 9, 2023
@ttxs69
Copy link

ttxs69 commented Oct 31, 2023

  1. open the UAC.
  2. click the level. No matter which level you are using, and you don't need to change it, just click it.
  3. Click OK. You should getting "restart the computer".
  4. Reboot the computer. It should work.

This solves my problem, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Culprit-Centennial Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

10 participants