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

PowerLauncher.exe causes other running MSI installers to fail to set up the shortcut #34391

Closed
avjts opened this issue Aug 22, 2024 · 2 comments
Labels
Issue-Bug Something isn't working Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Already Fixed/Doesn't Apply A change in the product has made the issue obsolete. Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@avjts
Copy link

avjts commented Aug 22, 2024

Microsoft PowerToys version

0.80 or 0.83

Installation method

GitHub

Running as admin

Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

This is a race bug, so there are machines that do not experience it and those that are highly repeatable. In our case we saw it on many Windows 10 Home machines and on Windows 11 sandbox, more often during upgrade, rarely during clean install, and using msi installer rather than an exe bundle.
To reproduce PowerToys.PowerLauncher.exe bug we need msi installer that installs an application that shows "toast notifications". Such app needs a shortcut with two extra attributes:

 <Shortcut ... >
   <ShortcutProperty Key="System.AppUserModel.ID" Value="..."/>
   <ShortcutProperty Key="{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 26" Value="..."/>
 </Shortcut>

There are many such apps out there, and I guess many of them experience the issue and have trouble pinpointing the root cause, e.g.: microsoft/WSL#11276

Steps:

  • You'll need Windows 11 sandbox
  • prepare an msi installer that install a shortcut with toast notification attributes. I prepared such: https://github.com/avjts/powerlauncher-bug, clone it and build. It contains a Readme. Most likely you'll need a couple of such installers with increasing version numbers, as it is more likely to reproduce the bug during updgrade.
  • confirm PowerToys.PowerLauncher.exe is running
  • start MyEmptyApp-3.6.285.msi, then MyEmptyApp-3.6.295.msi, and so on, until you see a message box with "Warning 1946 ..."

In the procmon log (screenshot below), you can see PowerLauncher.exe opens MyApp.lnk in share-read mode. Then during PowerLauncher is reading .lnk contents (50ms) two other processes try to access .lnk. Microsoft Defender queries the file and msiexec tries to set attributes in exclusive mode, and they are denied.

procmon-powerlauncher-bug

If you deactivate the "PowerToys Run," the problem will disappear.

Problably PowerLauncher.exe should postpone its actions a bit to allow msi installers to finish their job.

✔️ Expected Behavior

PowerLauncher.exe running in the background must not interfere msiexec installing shortcuts with shell attributes.

❌ Actual Behavior

PowerLauncher.exe running in the background opens shortcut files created by msiexec and blocks subsequent operations performed by msiexec.

Other Software

sample installer, that may help to reproduce the bug: https://github.com/avjts/powerlauncher-bug

@avjts avjts added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 22, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@AndrDm
Copy link

AndrDm commented Dec 6, 2024

Got exactly the same issue with PowerToys v.0.86.

Two days ago installed MSVC 2010 for some "legacy" reason, then Microsoft tries to update it, and KB2549864 was received through windows update, then Spy++.lnk gets accessed, but cannot, the log file in TEMP folder continously filled with following lines: "Warning 1946. Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'Spy++.lnk' could not be set. HRESULT 32. Are you sure you want to cancel?".

I killed setup.exe, then killed PowerToys (exit was not sufficient), then unstalled PowerToys with two attempt (the first attempt was not successful, stated "failed"), then restarted update, and now everything is OK.

So sad, PowerToys is good tool, but interference with MSI, especially with regular Windows Updates is not acceptable. I "catched" this occasionally, because the Windows gets slightly slower as usually and SSD drive activity was unusually high.

@htcfreek htcfreek added Product-PowerToys Run Improved app launch PT Run (Win+R) Window Status-In progress This issue or work-item is under development Run-Plugin Things that relate with PowerToys Run's plugin interface and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Feb 25, 2025
@jaimecbernardo jaimecbernardo 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 Feb 27, 2025
@jaimecbernardo jaimecbernardo added this to the PowerToys 0.89 milestone Feb 27, 2025
@cinnamon-msft cinnamon-msft added Resolution-Already Fixed/Doesn't Apply A change in the product has made the issue obsolete. and removed Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. labels Mar 5, 2025
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 Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Already Fixed/Doesn't Apply A change in the product has made the issue obsolete. Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
None yet
Development

No branches or pull requests

5 participants