Skip to content

[Enterprise, GPO] Add "Default Terminal app" policy to definition template #18363

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

Merged
merged 4 commits into from
Apr 18, 2025

Conversation

htcfreek
Copy link
Contributor

@htcfreek htcfreek commented Dec 25, 2024

Summary of the Pull Request

This PR implements a policy definition for setting/enforcing the default terminal application.

image

References and Relevant Issues

GitHub (issues):

Docs:

Detailed Description of the Pull Request / Additional comments

This PR adds a new policy definition to the ADMX templates for settings the default Terminal application in Windows.

Note

This PR does not change any code of Windows, Console Host or WIndows Terminal. It only adds the definiton for a new policy to the templates.

I got the registry values form the documentation and by testing the values.

The policy is only available as user policy because the registry values have to be in HKCU.

The Policy is implemented as preference (not inside the Policy key) and therefore keeps it's value on removing (not configured) it. You can see this in gpedit.msc on the policy symbol and the hint in the description.
image

Validation Steps Performed

Manual testing the policy.

PR Checklist

@htcfreek
Copy link
Contributor Author

Can you please assign me.

@htcfreek htcfreek changed the title [Enterprise, GPO] Add GPO to select default Terminal app [Enterprise, GPO] Add "Default Terminal app" policy to definition template Dec 25, 2024
@htcfreek
Copy link
Contributor Author

/azp run

Copy link

Commenter does not have sufficient privileges for PR 18363 in repo microsoft/terminal

@DHowett
Copy link
Member

DHowett commented Jan 7, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@DHowett
Copy link
Member

DHowett commented Jan 7, 2025

So, this is technically a third-party extensibility point. Can the policy support a freeform GUID entry (or GUID pair entry, as it were) for any third party terminals that have onboarded?

@htcfreek

This comment was marked as outdated.

@htcfreek

This comment was marked as outdated.

@htcfreek
Copy link
Contributor Author

htcfreek commented Jan 15, 2025

So, this is technically a third-party extensibility point. Can the policy support a freeform GUID entry (or GUID pair entry, as it were) for any third party terminals that have onboarded?

@DHowett
I did some tests now and there are two options. Both solutions support default value(s).

But while testing I found a strange and uncool behavior: Even if I define a "disabledList", the values will be deleted in Registry if the policy is disabled. Is this a blocking problem for us? (I have tested that WT and Console won't crash.)

Solutions

  1. Policy with drop-down that has fixed values.
    image
  2. Policy with two text boxes and well-known combinations listed in the description.
    image

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! I understand your comments about the free entry field, I'll need to think about them for a bit. This is looking very good.

@htcfreek
Copy link
Contributor Author

@DHowett
Any updates on this? What should we do with the PR?

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I thought about this for a while. Clearly, it has been a while.

We have no other 3p terminals that plug in to this mechanism.
Your solution of having the dropdown is, right now, more elegant and closer to product truth.

I think your original implementation was the right one.

Thank you so much for doing it, and for your patience. :)

@DHowett
Copy link
Member

DHowett commented Apr 18, 2025

I reset your branch to the point in time before you did the freeform textbox work. :)

@htcfreek
Copy link
Contributor Author

@DHowett
Who is able to finally approve and merge? PR is still blocked.

@DHowett
Copy link
Member

DHowett commented Apr 18, 2025

Who is able to finally approve and merge? PR is still blocked.

I got pulled into a meeting before I could click the button :P

@DHowett
Copy link
Member

DHowett commented Apr 18, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for doing this!

@DHowett DHowett enabled auto-merge (squash) April 18, 2025 22:24
@DHowett DHowett merged commit 68d9e0d into microsoft:main Apr 18, 2025
13 of 15 checks passed
@htcfreek
Copy link
Contributor Author

@DHowett , @carlos-zamora
What is the release version that will contain the updated templates? You can back port the PR to the next stable patch.

Btw, please don't forget the docs merge on release.

@DHowett
Copy link
Member

DHowett commented Apr 21, 2025

What is the release version that will contain the updated templates?

I can't tell you that until I've minted the release (considering that it contains the day of the year in the version number.)

It'll be included with the next servicing updates.

Thanks for the reminder about docs.

@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.22 Servicing Pipeline Apr 21, 2025
DHowett pushed a commit that referenced this pull request Apr 21, 2025
…plate (#18363)

This PR adds a new policy definition to the ADMX templates for settings
the default Terminal application in Windows.

> [!Note]
> This PR does not change any code of Windows, Console Host or Windows
Terminal. It only adds the definition for a new policy to the templates.

I got the registry values form the documentation and by testing the
values.

The policy is only available as user policy because the registry values
have to be in HKCU.

The Policy is implemented as preference (not inside the Policy key) and
therefore keeps it's value on removing (not configured) it. You can see
this in `gpedit.msc` on the policy symbol and the hint in the
description.

Closes #18302
Refs #18303

(cherry picked from commit 68d9e0d)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgZlw44
Service-Version: 1.22
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.23 Servicing Pipeline Apr 21, 2025
DHowett pushed a commit that referenced this pull request Apr 21, 2025
…plate (#18363)

This PR adds a new policy definition to the ADMX templates for settings
the default Terminal application in Windows.

> [!Note]
> This PR does not change any code of Windows, Console Host or Windows
Terminal. It only adds the definition for a new policy to the templates.

I got the registry values form the documentation and by testing the
values.

The policy is only available as user policy because the registry values
have to be in HKCU.

The Policy is implemented as preference (not inside the Policy key) and
therefore keeps it's value on removing (not configured) it. You can see
this in `gpedit.msc` on the policy symbol and the hint in the
description.

Closes #18302
Refs #18303

(cherry picked from commit 68d9e0d)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgZlw40
Service-Version: 1.23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Cherry Picked
Status: Cherry Picked
Development

Successfully merging this pull request may close these issues.

Group Policy to control default Terminal setting
3 participants