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 not Opening #10400

Closed
dkr91 opened this issue Mar 23, 2021 · 35 comments
Closed

PowerToys RUN not Opening #10400

dkr91 opened this issue Mar 23, 2021 · 35 comments
Assignees
Labels
Issue-Bug Something isn't working Priority-1 Bug that is high priority Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@dkr91
Copy link

dkr91 commented Mar 23, 2021

ℹ Computer information

  • PowerToys version: 0.33.1
  • PowerToy Utility: PowerToys Run
  • Running PowerToys as Admin: Yes and No (Both Tryed)
  • Windows build number: [run "winver"] 19042.867

📝 Provide detailed reproduction steps (if any)

  1. …Hitting Alt+Tab to Open Run

✔️ Expected result

What is the expected result of the above steps?
PowerToys Opens as a Dialog

❌ Actual result

What is the actual result of the above steps?
Nothing, even after Restart, Run was not displayed

📷 Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form
Can't show something not working.

@dkr91 dkr91 added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 23, 2021
@ajtruckle
Copy link

I use ALT + SPACE and not ALT + TAB.

@enricogior enricogior added Product-PowerToys Run Improved app launch PT Run (Win+R) Window and removed Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 23, 2021
@VNGVNGVNG
Copy link

the same problem for several days

@VNGVNGVNG
Copy link

#10369 (comment)
see this one to solve the problem

@TheFunnyBrain
Copy link

TheFunnyBrain commented Mar 24, 2021

I had a go at deleting %appdata%....PowerToys Run and it doesn't seem to allow it to open Run - it's been like this for the past few versions, even with reinstalls etc, swapping the shortcuts etc. :) I hope this helps.

PowerToysReport_2021-03-24-17-02-45.zip

Edit: I noticed that this issue also is present in "Powertoys Tour" when I press the button to launch Powertoys Run.

@mykhailopylyp
Copy link
Contributor

@TheFunnyBrain
You have PowerToys Run disabled. Try to enable it.
image

@TheFunnyBrain
Copy link

TheFunnyBrain commented Mar 29, 2021

@TheFunnyBrain
You have PowerToys Run disabled. Try to enable it.
image

Hi, sorry for the delayed reply, and thanks for getting back to me. :)

That's something I noticed too- I don't know if the the settings stick, as I've got it enabled in the GUI as in your screenshot, but if I close and reopen the window, the setting is reverted back to "off". I am guessing it didn't store it in my report.zip either.

@mykhailopylyp
Copy link
Contributor

@TheFunnyBrain
Can you enable/disable the PowerToys Run and then upload a new report? Old report does not contain enough data.

@TheFunnyBrain
Copy link

TheFunnyBrain commented Mar 29, 2021

PowerToysReport_2021-03-29-14-00-08.zip

Hi Mykhailopylyp, I've just toggled "Enable Powertoys Run" on and off a few times, and left it set to "off" before making this report .zip. :) Thanks again for your time, it's really appreciated.

Edit: I just noticed that settings.json (in the root folder of the folder) has "PowerToys Run":false, set. If I exit Powertoys and then manually change the value to true in notepad++, it reverts that file to say false again. I'm not sure if this is useful, but thought it may be worth noting? :)

Also may be worth noting that this is a fresh reinstall after clearing C:\Users\adamc\AppData\Local\Microsoft\PowerToys - I'm really curious on this one!

@mykhailopylyp
Copy link
Contributor

Note: From PowerToysReport_2021-03-29-14-00-08.zip it looks like PowerLauncher.exe process has been never started.

@mykhailopylyp
Copy link
Contributor

@TheFunnyBrain
Thank you for following up!
Can you update to the latest version(v0.35.0) and upload a new report if it still reproduces? We do not expect it to be fixed but we have more logs in the new version.

@N8Deathrider
Copy link

I am having this same issue and have been for quite some time. I can manually start PowerLauncher.exe and then stop PowerToys again and the hotkeys will start working, but if I'm not starting PowerLauncher.exe manually it never starts on its own. In PowerToys settings every time I open it PowerToys Run says it's toggled off (which is also reflected in settings.json but more on that file in a second) but switching it to enabled doesn't do anything. After switching it to on if I close the settings and reopen them and go back to PowerToys Run, it's greyed out disabled again. Attempting to enable it through settings.json with notepad++ doesn't help at all. Without PowerToys settings open, changing "PowerToys Run":false, to "PowerToys Run":true, and saving the document does nothing, if after that I open the PowerToys settings immediately (upon selecting the notepad++ window) it says this document was changed by another program and wants to know if I'd like to reload. Hitting yes the only change is that it changes "PowerToys Run":true, to "PowerToys Run":false,. The same thing happens editing settings.json with the settings open and then closing them, changing tabs in the settings, or toggling the slider in the PowerToys settings tab for PowerToys Run, every time I refresh the document to see what was changed by the program its always only setting "PowerToys Run": to false (of course if any other settings were changed or toggled they are correctly updated in the settings.json). At this point, I'm admittedly annoyed and tired of having to manually get it started. I'm out of ideas of what to do to fix it. I've tried reboots, reinstalls, launching with and without admin and or auto admin, and deleting the PowerToys Run folder like #10369 (comment). Nothing has solved the issue for me. I'm running on v0.35.0 as administrator.

@mykhailopylyp
Copy link
Contributor

@N8Deathrider
Thank you for reporting it!
Right-click on the PowerToys icon in the tray menu and select Report Bug
image
Drag and drop report into a GitHub comment.

@mykhailopylyp
Copy link
Contributor

@N8Deathrider
Can you try to

  • Exit PowerToys
  • Change "PowerToys Run":true to "PowerToys Run":false
  • Start PowerToys
  • Check if Alt+Space works

@TheFunnyBrain
Copy link

@TheFunnyBrain
Thank you for following up!
Can you update to the latest version(v0.35.0) and upload a new report if it still reproduces? We do not expect it to be fixed but we have more logs in the new version.

Not at all :) Sorry for the delay, here's a new report from 0.35.0, I hope it helps. :) I found that I can manually change the JSON to true, but then when I reopen the powertoys settings window again and change to the Run section, it'll then come up in notepad++ saying that the file was edited by another program. It seems that my edit is bulldozed back to false again. :)

I hope this is helpful. :)

PowerToysReport_2021-04-16-09-27-51.zip

@mykhailopylyp
Copy link
Contributor

Note: From the last logs, run_non_elevated does not succeeds.

inline bool run_non_elevated(const std::wstring& file, const std::wstring& params, DWORD* returnPid)
{
auto executable_args = L"\"" + file + L"\"";
if (!params.empty())
{
executable_args += L" " + params;
}
HWND hwnd = GetShellWindow();
if (!hwnd)
{
return false;
}
DWORD pid;
GetWindowThreadProcessId(hwnd, &pid);
winrt::handle process{ OpenProcess(PROCESS_CREATE_PROCESS, FALSE, pid) };
if (!process)
{
return false;
}
SIZE_T size = 0;
InitializeProcThreadAttributeList(nullptr, 1, 0, &size);
auto pproc_buffer = std::make_unique<char[]>(size);
auto pptal = reinterpret_cast<PPROC_THREAD_ATTRIBUTE_LIST>(pproc_buffer.get());
if (!InitializeProcThreadAttributeList(pptal, 1, 0, &size))
{
return false;
}
HANDLE process_handle = process.get();
if (!pptal || !UpdateProcThreadAttribute(pptal,
0,
PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
&process_handle,
sizeof(process_handle),
nullptr,
nullptr))
{
return false;
}
STARTUPINFOEX siex = { 0 };
siex.lpAttributeList = pptal;
siex.StartupInfo.cb = sizeof(siex);
PROCESS_INFORMATION pi = { 0 };
auto succeeded = CreateProcessW(file.c_str(),
const_cast<LPWSTR>(executable_args.c_str()),
nullptr,
nullptr,
FALSE,
EXTENDED_STARTUPINFO_PRESENT,
nullptr,
nullptr,
&siex.StartupInfo,
&pi);
if (succeeded)
{
if (pi.hProcess)
{
if (returnPid)
{
*returnPid = GetProcessId(pi.hProcess);
}
CloseHandle(pi.hProcess);
}
if (pi.hThread)
{
CloseHandle(pi.hThread);
}
}
return succeeded;
}

Further steps:

  • Verify run_non_elevated
  • Add logs

@mykhailopylyp
Copy link
Contributor

@TheFunnyBrain
Can you try to run PowerToys as a user?
image

Set it to off and restart PowerToys. And let us know if it fixes your issue.
Also, would you be able to install an unsigned build from us? We will add tracing to figure out what exactly is wrong.

@N8Deathrider
Copy link

Apologies for the wait @mykhailopylyp , changing "PowerToys Run":true to "PowerToys":false after exiting PowerToys and then starting PowerToys and pressing Alt+Space (and or the combination listed in the settings) yeilded me no different results. And here is the bug report zip, I hope there's something useful in here
PowerToysReport_2021-04-16-21-43-56.zip

@mykhailopylyp
Copy link
Contributor

@N8Deathrider
It looks as you have exactly the same issue as @TheFunnyBrain. Try to run PowerToys as a user and verify if the issue persists.
Would you be able to install an unsigned build from us? We will add tracing to figure out what exactly is wrong.

@TheFunnyBrain
Copy link

@TheFunnyBrain
Can you try to run PowerToys as a user?
image

Set it to off and restart PowerToys. And let us know if it fixes your issue.
Also, would you be able to install an unsigned build from us? We will add tracing to figure out what exactly is wrong.

Thanks for this suggestion - amusingly, I can't get PowerToys to allow me to run as a standard user, namely the settings.json keeps overwriting the parameter to make it run as standard user. The toggle says off, but on rebooting, restarting PowerToys etc, it always reopens as admin (now with the "always run as Administrator" box set to off. :)

I'd be happy to test out an unsigned build if it helps. :) Thanks again for the time you've already put into looking this over :)

image

@mykhailopylyp
Copy link
Contributor

@TheFunnyBrain
Thank you for following up.

  • Go to C:\Program Files\PowerToys
  • Right-click on PowerToys.exe
  • Select Properties
  • Select Compatibility tab

image

Run this program as an administrator should be unchecked. Let us know if it was the issue.

@TheFunnyBrain
Copy link

@TheFunnyBrain
Thank you for following up.

* Go to `C:\Program Files\PowerToys`

* Right-click on `PowerToys.exe`

* Select `Properties`

* Select `Compatibility tab`

image

Run this program as an administrator should be unchecked. Let us know if it was the issue.

That was it! :) It works perfectly running as user with compatibility settings as you suggested.

My steps:

  • Set PowerToys.exe to not run as administrator using the settings in your screenshot above. (Thanks again!🙂)
  • Clicked no when Powertoys Run came up in UAC or Win10 equivalent to "make changes to my system".
  • Changed the slider to enable "run"
  • Clicked no when Powertoys run asked again to "make changes to system"
  • Run didn't work despite being enabled.
  • Quit Powertoys

Then I changed the .json value for PowertoysRun to "true", and followed the above steps to no avail. When I relaunched powertoys, it reverted back to being disabled in settings. (Possibly it was using a backup version or another file?)

I then did the above again, but allowed powertoys to make changes after enabling Powertoys Run in settings, it manually set the value to True in the .json and works perfectly.

Out of interest, these confirmation boxes had a blue icon (possibly looked like a powershell icon?) instead of the powertoys.exe icon. It brings up the confirmation each time I flip to enable powertoys run (but not to disable it).

I hope this was clear and helps with diagnosing the issue. Thank you again! :)

image

@enricogior
Copy link
Contributor

@TheFunnyBrain
did you set the Run this program as an administrator option in the PowerToys.exe properties?
We has seen a few cases like yours and we would like to understand how that option was set.
Thanks.

@mykhailopylyp
Copy link
Contributor

@dkr91
Can you update to 0.35 and verify if it still happens?
In case it still happens upload a bug report.

@enricogior enricogior added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 20, 2021
@mykhailopylyp
Copy link
Contributor

Action item:
Add logs to the following function so we see if the issue is the same for different users.

inline bool run_non_elevated(const std::wstring& file, const std::wstring& params, DWORD* returnPid)
{
auto executable_args = L"\"" + file + L"\"";
if (!params.empty())
{
executable_args += L" " + params;
}
HWND hwnd = GetShellWindow();
if (!hwnd)
{
return false;
}
DWORD pid;
GetWindowThreadProcessId(hwnd, &pid);
winrt::handle process{ OpenProcess(PROCESS_CREATE_PROCESS, FALSE, pid) };
if (!process)
{
return false;
}
SIZE_T size = 0;
InitializeProcThreadAttributeList(nullptr, 1, 0, &size);
auto pproc_buffer = std::make_unique<char[]>(size);
auto pptal = reinterpret_cast<PPROC_THREAD_ATTRIBUTE_LIST>(pproc_buffer.get());
if (!InitializeProcThreadAttributeList(pptal, 1, 0, &size))
{
return false;
}
HANDLE process_handle = process.get();
if (!pptal || !UpdateProcThreadAttribute(pptal,
0,
PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
&process_handle,
sizeof(process_handle),
nullptr,
nullptr))
{
return false;
}
STARTUPINFOEX siex = { 0 };
siex.lpAttributeList = pptal;
siex.StartupInfo.cb = sizeof(siex);
PROCESS_INFORMATION pi = { 0 };
auto succeeded = CreateProcessW(file.c_str(),
const_cast<LPWSTR>(executable_args.c_str()),
nullptr,
nullptr,
FALSE,
EXTENDED_STARTUPINFO_PRESENT,
nullptr,
nullptr,
&siex.StartupInfo,
&pi);
if (succeeded)
{
if (pi.hProcess)
{
if (returnPid)
{
*returnPid = GetProcessId(pi.hProcess);
}
CloseHandle(pi.hProcess);
}
if (pi.hThread)
{
CloseHandle(pi.hThread);
}
}
return succeeded;
}

@ghost ghost added the Status-No recent activity no activity in the past 5 days when follow up's are needed label May 19, 2021
@ghost
Copy link

ghost commented May 19, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

@mykhailopylyp mykhailopylyp removed the Status-No recent activity no activity in the past 5 days when follow up's are needed label May 19, 2021
@ghost ghost added the Status-No recent activity no activity in the past 5 days when follow up's are needed label May 24, 2021
@ghost
Copy link

ghost commented May 24, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

@mykhailopylyp mykhailopylyp removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Status-No recent activity no activity in the past 5 days when follow up's are needed labels May 25, 2021
@crutkas crutkas added Issue-Bug Something isn't working Priority-1 Bug that is high priority labels Jun 11, 2021
@Sisyphusean
Copy link

I have gone through this thread and disabled the "start as administrator" option in powertoys and in the compatibility menu. I am on v 0.37.2 and I am still having this issue
image

@mykhailopylyp
Copy link
Contributor

@Ik00k0
Have you restarted PowerToys from the tray menu?

@mykhailopylyp mykhailopylyp added the Status-In progress This issue or work-item is under development label Jun 16, 2021
@mykhailopylyp mykhailopylyp added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Jun 22, 2021
@mykhailopylyp
Copy link
Contributor

Was fixed in 0.41.4

@TheFunnyBrain
Copy link

I can happily confirm it's fixed for me in the most recent update (possibly even before this one). Thank you for your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Priority-1 Bug that is high priority Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

9 participants