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

[PowerToys Run] Disable module on windows startup #11684

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

mykhailopylyp
Copy link
Contributor

Summary of the Pull Request

What is this about:
We disable the PT Run module if the PT Run process fails to start. In this PR we make it more robust. For some users, the process can not be started because the shell window is not available yet, and GetShellWindow() returns null. We've seen it happen on windows starup. So we should recover if GetShellWindow() fails. Take into account that we only use the shell window to start unelevated PT Run from elevated PT.

What is include in the PR:

  • Don't disable the module If the process can not be started
  • Log a warning if GetShellWindow() returns null
  • Log a warning if the process can not be started and PT is elevated. It is expected behavior

How does someone test / validate:
Can be tested artificially. Try to fail GetShellWindow()

Quality Checklist

Contributor License Agreement (CLA)

A CLA must be signed. If not, go over here and sign the CLA.

@mykhailopylyp mykhailopylyp added the Product-PowerToys Run Improved app launch PT Run (Win+R) Window label Jun 9, 2021
@crutkas
Copy link
Member

crutkas commented Jun 9, 2021

Heck yeah!

@crutkas
Copy link
Member

crutkas commented Jun 10, 2021

@mykhailopylyp is #9208 this as well?

@crutkas
Copy link
Member

crutkas commented Jun 10, 2021

Same with #9931

@crutkas
Copy link
Member

crutkas commented Jun 10, 2021

And #10376

@mykhailopylyp
Copy link
Contributor Author

I don't think #9208, #9931, #10376 are fixed by this. If a computer goes to sleep PowerToys is not restarted. And this PR fixes the issue when GetShellWindow returns null on startup.

@mykhailopylyp mykhailopylyp merged commit 8d5f52c into microsoft:master Jun 10, 2021
@mykhailopylyp mykhailopylyp deleted the issue-11475 branch June 10, 2021 11:09
@mykhailopylyp mykhailopylyp changed the title [PowerToys Run] Disable module on startup [PowerToys Run] Disable module on windows startup Jun 11, 2021
@crutkas crutkas mentioned this pull request Jun 11, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants