Skip to content
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

[GPO]Add a policy for controlling CmdPal enabled state #503

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jaimecbernardo
Copy link
Collaborator

Summary of the Pull Request

Some of the changes for GPO were already on the repo, so this PR just completes functionality.

  • Completes the required .admx and .adml files for adding a policy for controlling the enabled state of CmdPal within PowerToys.
  • Ports some of the GPO C++ code from the PowerToys source to C# inside CmdPal's codebase, to reduce dependencies on PowerToys.
  • Check GPO during CmdPal startup in order to stop execution as soon as possible in CmdPal's lifecycle.

Note: Dashboard in Settings seems to be broken, but that doesn't seem to be caused by this specific PR.

Validation Steps Performed

  • Copy "src\gpo\assets\PowerToys.admx" to "C:\Windows\PolicyDefinitions".
  • Copy "src\gpo\assets\en-US\PowerToys.adml" to "C:\Windows\PolicyDefinitions\en-US".
  • Open gpedit.msc and verify the policy exists in both Computer Configurations and User Configuration.
    image
  • Exit PowerToys and set the policy to Disabled:
    image
  • Start PowerToys and verify that CmdPal is disabled in Settings and that you can't enable it:
    image
    image
  • Try to start CmdPal directly and verify it just exits without starting.
  • Exit PowerToys and set the policy to Enabled.
  • Start PowerToys and verify that CmdPal is enabled in Settings and that you can't disable it:
    image
  • Remember to set the policies to "Not configured" after validating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant