Skip to content

Setting Defaults to Run this profile as Administrator in SUI won't launch un-elevated profiles  #12309

@elsaco

Description

@elsaco

Windows Terminal version

main fbe0416

Windows build number

10.0.19044.0

Other Software

No response

Steps to reproduce

  • build and deploy latest CascadiaPackage
  • toggle Run this profile as Administrator for Defaults to On . It will set it for all the other profiles, also.
  • select one profile and toggle the setting to Off
  • launch the un-elevated profile

Sample SUI screenshot:

wt_elevate_defaults

Expected Behavior

  • new un-elevated terminal window

Actual Behavior

  • any profile is launched in same window and elevated, even the ones with "elevate": false set.

Sample screenshot with CMD profile set to un-elevated:

wt_cmd_not_elevated_profile

settings.json with CMD not elevated:

    "profiles": 
    {
        "defaults": 
        {
            "elevate": true,
            "startingDirectory": "C:\\"
        },
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "elevate": false,
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },

It works the other way around. If some profile is set to be elevated a new terminal window pops-up with admin rights.

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRThis issue has a related PRIssue-DocsIt's a documentation issue that really should be on MicrosoftDocs/Console-DocsNeeds-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions