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

Fix signaling the app shutdown event running as admin #3874

Merged
merged 3 commits into from Nov 10, 2023

Conversation

msftrubengu
Copy link
Contributor

@msftrubengu msftrubengu commented Nov 10, 2023

There's bug in the OS where the WM_QUERYENDSESSION message is not send when a package is being updated if the package is running elevated. This makes winget configure --enable to stop at 95% and eventually get terminated by the system for an update. The update is successful, but the experience is not the best. It also makes it harder to use IConfigurationStatics::IConfigurationStatics in an elevated context.

The fix is to use the PackageCatalog APIs and register for PackageUpdating events when winget is running elevated and in a package context and signal the competition event if the progress is more than 0. Otherwise create the window and listen to messages.

Enable test where a new update is being registered since now it will work and move test to force the WM_QUERYENDSESSION to UTs

Microsoft Reviewers: Open in CodeFlow

@msftrubengu msftrubengu changed the title Le draft Fix signaling the app shutdown event running as admin Nov 10, 2023
@msftrubengu msftrubengu marked this pull request as ready for review November 10, 2023 22:20
@msftrubengu msftrubengu requested a review from a team as a code owner November 10, 2023 22:20
@msftrubengu msftrubengu merged commit e6b1d02 into microsoft:master Nov 10, 2023
8 checks passed
@msftrubengu msftrubengu deleted the user/rubengu/adminfix branch November 14, 2023 00:31
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.

None yet

2 participants