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

The ui:CommandBar.SecondaryCommands refused to work with non-admin user. #353

Open
Bo-Liu-BL opened this issue May 19, 2021 · 1 comment

Comments

@Bo-Liu-BL
Copy link

Bo-Liu-BL commented May 19, 2021

Hi experts,

We found that the ui:CommandBar.SecondaryCommands refused to work in the following scenario:

  1. Log in the system with a standard user who has no admin privilege;
  2. Create an application with a button or menu or something else that could be clicked;
  3. In the clicked event handler, create a new window:
    public partial class TestWindow : Window
  4. In the newly created window create one or more commands in the ui:CommandBar.SecondaryCommands;
  5. In one command handler, bind an external script which requires admin privilege will be executed;
  6. Run the application with non-admin user;
  7. Click the ... then click the command which has been bound an external script in step TabControl Styling #5 to execute it;
  8. The system dialog will be popped up to require admin privilege;
  9. Dismiss the dialog by clicking "No", or provide admin credentials;
  10. Click the ... again;

We expected that the commands will be shown in step #10. Unfortunately, nothing is shown.

The issue isn't observed when the host machine is logged in with admin, or the application is run as administrator.
This issue is also not observed if the script in step #5 is executed in the application main window in step #2 instead of the new window in #3.

Any suggestion/thought?

Thanks very much!

@Bo-Liu-BL
Copy link
Author

Per my testing, after clicking the "...", the focus is quickly switched to other control thus the command list couldn't be shown.
(I am using https://docs.microsoft.com/en-us/windows/win32/winauto/inspect-objects)

So I suspect that there might be some issues in the focus processing logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants