startupActions not run when in elevated window #18385

Open
opened 2026-01-31 06:12:20 +00:00 by claunia · 1 comment
Owner

Originally created by @svict4 on GitHub (Sep 6, 2022).

Windows Terminal version

4.14.2282.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

  1. Add a startupAction in the settings.json at the top level
{
  "$help": "https://aka.ms/terminal-documentation",
  "startupActions": "new-tab; new-tab",
  ...
}
  1. Add the elevate property to a profile, such as the defaults profile
...
  "profiles": {
    "defaults": {
      "colorScheme": "Tango Dark",
      "elevate": true,
      ...
    },
    "list": [ ... ]
  }
...
  1. See that the startupActions are not respected.
  2. See that by commenting/removing the elevate property, that it runs the startupActions

Expected Behavior

That the arguments in startupActions are run, even in elevated window

Actual Behavior

startupActions are ignored/not run

Originally created by @svict4 on GitHub (Sep 6, 2022). ### Windows Terminal version 4.14.2282.0 ### Windows build number 10.0.22000.0 ### Other Software _No response_ ### Steps to reproduce 1. Add a `startupAction` in the `settings.json` at the top level ``` { "$help": "https://aka.ms/terminal-documentation", "startupActions": "new-tab; new-tab", ... } ``` 2. Add the [`elevate` property](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-general#automatically-run-as-administrator) to a profile, such as the `defaults` profile ``` ... "profiles": { "defaults": { "colorScheme": "Tango Dark", "elevate": true, ... }, "list": [ ... ] } ... ``` 3. See that the `startupActions` are not respected. 4. See that by commenting/removing the `elevate` property, that it runs the `startupActions` ### Expected Behavior That the arguments in `startupActions` are run, even in `elevated` window ### Actual Behavior `startupActions` are ignored/not run
claunia added the Issue-FeatureArea-SettingsProduct-Terminal labels 2026-01-31 06:12:21 +00:00
Author
Owner

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

We'll need to come up with a proper design for this.

Opening an elevated "Foo" profile triggering the creation of a elevated window isn't going to hit startupActions ever. In that case, the "startup actions" has been effectively replaced by a single action - "open a tab with Foo".

  • Maybe we need an "open elevated window" action, that just opens wt without any actions. That would default to just startupActions.
  • Maybe we need a separate elevatedStartup for actions to run on startup of an elevated window. These would then be different from startupActions.
  • There's also #12191 - that could be combined with the command palette's commandline mode for a --elevate nt ; sp command to run specific actions in an elevated window.
@zadjii-msft commented on GitHub (Nov 7, 2022): We'll need to come up with a proper design for this. Opening an elevated "Foo" profile triggering the creation of a elevated window isn't going to hit `startupActions` ever. In that case, the "startup actions" has been effectively replaced by a single action - "open a tab with Foo". * Maybe we need an "open elevated window" action, that just opens wt without any actions. That would default to just `startupActions`. * Maybe we need a separate `elevatedStartup` for actions to run on startup of an elevated window. These would then be different from `startupActions`. * There's also #12191 - that could be combined with the command palette's commandline mode for a `--elevate nt ; sp` command to run specific actions in an elevated window.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18385