PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

CmdPal - "All Apps" sources don't hot-reload on saving settings

Open kaiiboraka opened this issue 8 months ago • 1 comments

Microsoft PowerToys version

0.90.0

Installation method

GitHub

Running as admin

No

Area(s) with issue?

Command Palette

Steps to reproduce

Image

I don't know how exactly reproducible this is, but I have some programs and games installed that "All Apps" just isn't finding, despite them being installed like default to Program Files/x86.

It may be directly related to the following issue as well, which probably deserves its own report, but the bottom two options in the All Apps settings are not saving:

Image

I have checked and rechecked the "Include apps registered in the Registry" and "Include apps anywhere on the %PATH%" options and have pressed save, but the setting does not remain. Everytime I reopen the settings menu here they are blank again. So the setting isn't being saved.

✔️ Expected Behavior

Every installed and registered app, including games, should show up in the list. Adding new shortcuts to the Start Menu should update the list of available apps.

❌ Actual Behavior

Many apps are missing, despite them being installed and included in the registry, or existing in/being added to the Start Menu. The "Include apps registered in the Registry" and "Include apps anywhere on the %PATH%" settings aren't being saved, despite the save button being pressed. If CmdPal or PowerToys crashes and restarts, they are definitely reset. Even when apparently checked, the functionality of the settings to include Registry apps doesn't seem to be operating completely correctly anyway, as the app in question, Battle.net (and all of its installed games), is installed in the registry and is not showing up in the list.

Other Software

No response

kaiiboraka avatar Apr 05 '25 22:04 kaiiboraka

Alright so there's two things you're seeing here:

  • Part the first: Saving extension settings doesn't actually update that page. That's tracked in #38191
  • Part the second: Specifically the All Apps settings don't hot-reload. You actually need to "quit" the Command Palette, then restart it to get it to reload that setting.

I'll use this thread to track part the second.

For my own notes: I think I had a branch back in February that tried this? Probably around one of the earlier attempts to work around the app thumbnails load crash.

zadjii-msft avatar Apr 07 '25 14:04 zadjii-msft

I believe this is resolved now. At least it refreshes when I change settings in #40915

michaeljolley avatar Aug 26 '25 20:08 michaeljolley

I believe this is resolved now. At least it refreshes when I change settings in #40915

Nope...Even if the setting refreshed, there's no changes in the data source

moooyo avatar Aug 27 '25 03:08 moooyo

In 0.94.0, there is a reload command but it doesn’t help to refresh the apps list if you manually deleted or created a .lnk file in %AppData%\Microsoft\Windows\Start Menu\Programs.

In this case, I need to exit CmdPal and start it again. Not a user friendly task.

The best would be the reload command just does the job for updating apps list.

In the meantime, I created a batch that restart CmdPal:

@echo off
echo Restarting de Microsoft.CmdPal.UI.exe...

taskkill /IM Microsoft.CmdPal.UI.exe /F

timeout /t 2 /nobreak >nul

start "" "Microsoft.CmdPal.UI.exe"

You need to add C:\Program Files\WindowsApps\Microsoft.CommandPalette_0.5.2412.0_x64__8wekyb3d8bbwe\ in your path.

Fred-Vatin avatar Sep 10 '25 11:09 Fred-Vatin

In 0.94.0, there is a reload command but it doesn’t help to refresh the apps list if you manually deleted or created a .lnk file in %AppData%\Microsoft\Windows\Start Menu\Programs.

Technically, Reload doesn’t work on any built-in provider. It just drops them and then picks them up again in the same state. Unlike third-party extensions, which run in a separate process and are terminated and restarted with a clean slate, built-in extensions live in the main process, so the purge doesn’t affect them.

Would it make sense to add reload code for them as well? That’s a question only masters of CmdPal can answer.

start "" "Microsoft.CmdPal.UI.exe" You need to add C:\Program Files\WindowsApps\Microsoft.CommandPalette_0.5.2412.0_x64__8wekyb3d8bbwe\ in your path.

With this, you don't have to add it to the PATH:

 start "x-cmdpal://"

jiripolasek avatar Sep 15 '25 19:09 jiripolasek

Thanks. I didn’t know there was a registered protocol for cmdPal. The command is

start "" "x-cmdpal://"

though.

Fred-Vatin avatar Sep 16 '25 00:09 Fred-Vatin