Crash, Not Launching or Crazy Mouse Pointer Flicker - "Run as administrator" Setting in Terminal Settings or File #18933

Closed
opened 2026-01-31 06:28:50 +00:00 by claunia · 3 comments
Owner

Originally created by @wilburlikesmith on GitHub (Nov 21, 2022).

Windows Terminal version

1.15.2875.0

Windows build number

10.0.22621.0

Other Software

No response

Steps to reproduce

Go to settings and choose any app to run as administrator by default. Or add this line in the settings.json file. Either to all before the individual settings:

'"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"firstWindowPreference": "persistedWindowLayout",
"minimizeToNotificationArea": false,
"profiles": 
{
    "defaults": 
    {
        "elevate": true
    },
    "list": 
    [
        {
            "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "hidden": false,
            "name": "PowerShell",
            "source": "Windows.Terminal.PowershellCore"
        },`

or just designated apps;

`"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"firstWindowPreference": "persistedWindowLayout",
"minimizeToNotificationArea": false,
"profiles": 
{
    "defaults": {},
    "list": 
    [
        {
            "elevate" : true,
            "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "hidden": false,
            "name": "PowerShell",
            "source": "Windows.Terminal.PowershellCore"
        },`

Expected Behavior

Run as administrator.

Actual Behavior

Go to Settings in Terminal and set any profile or app to "Run as Administrator". I had to go to Task Manager "End Process" or "Terminate" under App Settings in Windows also works pretty well.

Not sure why it happens, found a post here, which made me go look at the JSON settings files. Thought made some uninstall was dirty or sound drivers failing. There was an odd file, elevated-state.json, which I don't know if it was or is going to be used.

"%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\"

Regardless of whether it's the new or an old way of doing things and think my setting changes are minute this time still... I went ahead and deleted everything just to see if it will magically regenerate and fix the problem which it did.

TL;DR

With some trial and error, I think I can say that this file elevated-state.json doesn't seem to matter, there is however another state.json.

First thought it was other weird settings, then thought it was just the original Powershell (saw now that it is v1) which I don't know how it's running or still around since removed from old Windows Programs and Features as well as new Windows settings. Turns out any of the apps would cause this mouse pointer flickering and seem to not launch at all, I suppose now that it goes into a "launch and crash loop".

Second thought, after looking up on schema and docs, because I always suspect format and syntax, seems that was correct except _ "defaults": { "elevate" : true }_, (meaning any of the terminals will launch elevated). removing that, Terminal instantly launched AND elevated.

`"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"firstWindowPreference": "persistedWindowLayout",
"minimizeToNotificationArea": false,
"profiles": 
{
    "defaults": { "elevate" : true },
    "list": 
    [
        {
            "colorScheme": "Solarized Dark",
            "experimental.retroTerminalEffect": true,
            "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "hidden": false,
            "name": "PowerShell 7",
            "source": "Windows.Terminal.PowershellCore"
        },
        {
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "hidden": false,
            "name": "PowerShell OG"
        },`

Thirdly and forth etc... After some more trial and error involving me moving that setting around in the settings file... I did suspect that, because have run into this behaviour previously. Resetting or reinstalling Terminal (sometimes Windows) fixed it.

When it happened this time, fortunately, it was still fresh with me (including other OS changes). After deleting the settings file fixed it all, I did the GUI Settings test via Terminal's settings tab, which writes that line in the settings.json file, seemingly correct.

So it happens with both methods, changing it via Terminal GUI Settings and / or manually in the settings.json file. The funny thing is, that it's is now running elevated without the setting.

Originally created by @wilburlikesmith on GitHub (Nov 21, 2022). ### Windows Terminal version 1.15.2875.0 ### Windows build number 10.0.22621.0 ### Other Software _No response_ ### Steps to reproduce Go to settings and choose any app to run as administrator by default. Or add this line in the _settings.json_ file. Either to all before the individual settings: '"copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "firstWindowPreference": "persistedWindowLayout", "minimizeToNotificationArea": false, "profiles": { "defaults": { "elevate": true }, "list": [ { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore" },` or just designated apps; `"copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "firstWindowPreference": "persistedWindowLayout", "minimizeToNotificationArea": false, "profiles": { "defaults": {}, "list": [ { "elevate" : true, "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore" },` ### Expected Behavior Run as administrator. ### Actual Behavior Go to Settings in Terminal and set any profile or app to "Run as Administrator". I had to go to Task Manager "End Process" or "Terminate" under App Settings in Windows also works pretty well. Not sure why it happens, found a post here, which made me go look at the JSON settings files. Thought made some uninstall was dirty or sound drivers failing. There was an odd file, _elevated-state.json_, which I don't know if it was or is going to be used. `"%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\"` Regardless of whether it's the new or an old way of doing things and think my setting changes are minute this time still... I went ahead and deleted everything just to see if it will magically regenerate and fix the problem which it did. ### TL;DR With some trial and error, I think I can say that this file _elevated-state.json_ doesn't seem to matter, there is however another _state.json_. First thought it was other weird settings, then thought it was just the original Powershell (saw now that it is v1) ~~which I don't know how it's running or still around since removed from old Windows Programs and Features as well as new Windows settings.~~ Turns out any of the apps would cause this mouse pointer flickering and seem to not launch at all, I suppose now that it goes into a "launch and crash loop". Second thought, after looking up on schema and docs, because I always suspect format and syntax, seems that was correct except _ "defaults": { "elevate" : true }_, (meaning any of the terminals will launch elevated). removing that, Terminal instantly launched AND elevated. `"copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "firstWindowPreference": "persistedWindowLayout", "minimizeToNotificationArea": false, "profiles": { "defaults": { "elevate" : true }, "list": [ { "colorScheme": "Solarized Dark", "experimental.retroTerminalEffect": true, "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell 7", "source": "Windows.Terminal.PowershellCore" }, { "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": false, "name": "PowerShell OG" },` Thirdly and forth etc... After some more trial and error involving me moving that setting around in the settings file... I did suspect that, because have run into this behaviour previously. Resetting or reinstalling Terminal (sometimes Windows) fixed it. When it happened this time, fortunately, it was still fresh with me (including other OS changes). After deleting the settings file fixed it all, I did the GUI Settings test via Terminal's settings tab, which writes that line in the _settings.json_ file, seemingly correct. So it happens with both methods, changing it via Terminal GUI Settings and / or manually in the _settings.json_ file. The funny thing is, that it's is now running elevated without the setting.
claunia added the Needs-TriageIssue-BugNeeds-Author-FeedbackNo-Recent-Activity labels 2026-01-31 06:28:51 +00:00
Author
Owner

@wilburlikesmith commented on GitHub (Nov 21, 2022):

Apologies for the manny edits and I can't seem to get my ` out of the post without it removing the formatting as well. Must go eat now...

@wilburlikesmith commented on GitHub (Nov 21, 2022): Apologies for the manny edits and I can't seem to get my ` out of the post without it removing the formatting as well. Must go eat now...
Author
Owner

@zadjii-msft commented on GitHub (Nov 21, 2022):

this sounds a bit like #14259 / #13928. Is powershell, cmd, or whatever, set to run as admin by default (outside of the Terminal settings)?

@zadjii-msft commented on GitHub (Nov 21, 2022): this sounds a bit like #14259 / #13928. Is powershell, cmd, or whatever, set to run as admin by default (outside of the Terminal settings)?
Author
Owner

@ghost commented on GitHub (Dec 5, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Dec 5, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18933