-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Run as administrator profiles do not run until terminal is ran as administrator. #13675
Comments
Wait like, a new window for the Terminal doesn't just open itself? And you need to go manually start the Terminal as admin, and when you do that, the previously requested elevated profile also launches? That's super weird. Could you share your settings.json file/? |
Sure, here it is. |
This comment was marked as off-topic.
This comment was marked as off-topic.
settings, without schemes{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
{
"command": "paste",
"keys": "ctrl+v"
},
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
}
],
"alwaysShowNotificationIcon": true,
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"profiles":
{
"defaults":
{
"experimental.retroTerminalEffect": true,
"useAcrylic": true
},
"list":
[
{
"colorScheme": "Campbell Powershell",
"cursorShape": "filledBox",
"experimental.retroTerminalEffect": true,
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell",
"useAcrylic": true
},
{
"colorScheme": "Vintage",
"cursorShape": "underscore",
"experimental.retroTerminalEffect": true,
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt",
"opacity": 50,
"padding": "8"
},
{
"colorScheme": "Solarized Dark",
"experimental.retroTerminalEffect": true,
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure",
"useAcrylic": true
},
{
"cursorShape": "emptyBox",
"experimental.retroTerminalEffect": true,
"guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
"hidden": true,
"name": "Debian",
"source": "Windows.Terminal.Wsl",
"useAcrylic": true
},
{
"colorScheme": "One Half Dark",
"commandline": "%windir%\\py.exe",
"experimental.retroTerminalEffect": true,
"guid": "{6459c186-a8e1-4185-91df-ab3fac03383e}",
"icon": "C:\\Windows\\py.exe,0",
"name": "Python 3.9",
"tabTitle": "Python 3.9 Interpreter",
"useAcrylic": true
},
{
"guid": "{330eddfb-6ba7-562d-b414-f8bb158e0397}",
"hidden": false,
"name": "Developer Command Prompt for VS 2022",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{dc6bfe40-35f4-5de7-b308-60f79c5e3d2f}",
"hidden": false,
"name": "Developer PowerShell for VS 2022",
"source": "Windows.Terminal.VisualStudio"
},
{
"altGrAliasing": true,
"antialiasingMode": "grayscale",
"closeOnExit": "graceful",
"colorScheme": "Vintage",
"commandline": "%SystemRoot%\\System32\\cmd.exe",
"cursorHeight": 25,
"cursorShape": "vintage",
"elevate": true,
"experimental.retroTerminalEffect": false,
"font":
{
"face": "Source Code Pro",
"size": 12,
"weight": 990
},
"guid": "{6c1e9995-d63e-4ce5-9956-2daec99a88a7}",
"hidden": false,
"historySize": 9001,
"icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
"name": "Command Prompt (Administrator)",
"opacity": 50,
"padding": "8",
"snapOnInput": true,
"startingDirectory": "C:\\",
"useAcrylic": false
},
{
"altGrAliasing": true,
"antialiasingMode": "grayscale",
"closeOnExit": "graceful",
"colorScheme": "Vintage",
"commandline": "%SystemRoot%\\System32\\cmd.exe",
"cursorShape": "underscore",
"elevate": true,
"experimental.retroTerminalEffect": true,
"font":
{
"face": "Cascadia Mono",
"size": 12
},
"guid": "{ebd04fa3-78ce-434c-8149-67a3994032b8}",
"hidden": false,
"historySize": 9001,
"icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
"name": "Command Prompt (Copy)",
"opacity": 50,
"padding": "8",
"snapOnInput": true,
"startingDirectory": "%USERPROFILE%"
}
]
},
"tabWidthMode": "titleLength",
"useAcrylicInTabRow": true
} Nothing too interesting other than just the |
As I understand it, the problem is directly related to the crash. |
Maybe the elevation code through elevate-shim.exe isn't good enough. I ran this program directly with elevated rights to the TrustedInstaller level (system profile), on behalf of System. I also got a program crash.
As far as I understand, such a launch raises the rights above UAC, tk. access to this program is required. This "breaks" the launch of the terminal. |
Windows Terminal version
1.14.1963.0
Windows build number
10.0.22000.832
Other Software
No response
Steps to reproduce
Expected Behavior
When the profile is ran under the standard non-admin account, the system should prompt the user for administrator credentials. Once the credentials are entered, the profile should run in a new windows with administrator permissions.
Actual Behavior
After entering credentials to the user account control prompt, the profile does not run. Instead it's execution (and appearance of its windows) is delayed until a new instance of terminal is ran as administrator.
This issue does not affect administrator accounts, it only occurs for accounts that are not in the administrators group.
The text was updated successfully, but these errors were encountered: