Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 7 posts ]
Author Message
 Post subject: UAC Prompt not Focused
PostPosted: Thu Oct 18, 2018 2:22 am 
Offline
User avatar

Joined: Fri Jan 29, 2016 11:02 am
Posts: 119
Location: Seattle, WA
So when I right click on CMD window which is in a shortcut in my custom menu in my dock, to run as Admin, the UAC prompt appears, but is not in focus. I have to alt-tab to bring it to front and then click on it.

I have seen there are a few similar issues re: UAC prompts not showing but I believe it's different for each user based on their system settings, so there's no bells or whistles to my system. Everything is default as far as UAC goes. It's just odd that it puts the prompt behind. Even if there are no other open windows.

I am wondering if it's related to Nexus position and or behavioral settings? Where the super secret code tells it to always be on top? I have tried ticking/unticking all options in re: to my main dock and others but they do not resolve.

Attachment:
2018-10-17 19 17 14.jpg
2018-10-17 19 17 14.jpg [ 497.95 KiB | Viewed 13691 times ]


Attachment:
2018-10-17 19 17 53.jpg
2018-10-17 19 17 53.jpg [ 484.36 KiB | Viewed 13691 times ]


Back to top
 Profile  
 
 Post subject: Re: UAC Prompt not Focused
PostPosted: Thu Oct 18, 2018 3:17 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Ok, here is the gist of it (I think you will notice this should only happen in menus, not when launching from a dock, shelf or drawer):

For the UAC prompt to appear on the foreground when launching an application, the window that does the launching MUST exist *and* be be in the foreground itself.

And here lies the problem: when you launch an application from a menu, the application is launched asynchronously via ShellExecuteEx and the menu automatically closes immediately after. So, when it's time for the UAC prompt to appear, the window that launched it (which is the menu) no longer exists. And so the UAC prompt appears minimized.

What is strange is in your case this happening with the right click context menu. Here 'Run as Admin' is executed by invoking the context menu option directly via InvokeCommand. This operation is NOT asynchronous and so the right click context menu should stay open until the application has finished launching (and thus not run into the problem described above).

How did you do your custom menu in the dock? Is it a folder set to open as a menu (and you put all those shortcuts in the folder) or a NextSTART hotspot?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: UAC Prompt not Focused
PostPosted: Thu Oct 18, 2018 3:36 am 
Offline
User avatar

Joined: Fri Jan 29, 2016 11:02 am
Posts: 119
Location: Seattle, WA
Yes, I have a folder with shortcuts. There is no way to create a shortcut for cmd and edit the properties to run as admin. So I use the right click in the menu to do so.

I could create a subdock and insert those shortcuts that way and yes, use the nexus built in command, but the menu is my preference as with all those items, the subdock and icons would be huge. lol


Back to top
 Profile  
 
 Post subject: Re: UAC Prompt not Focused
PostPosted: Fri Oct 19, 2018 4:33 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Mind if I use your first screenshot on the Winstep web site? I kind of like it. :)

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: UAC Prompt not Focused
PostPosted: Fri Oct 19, 2018 8:17 pm 
Offline
User avatar

Joined: Fri Jan 29, 2016 11:02 am
Posts: 119
Location: Seattle, WA
By all means, feel free!


Back to top
 Profile  
 
 Post subject: Re: UAC Prompt not Focused
PostPosted: Sat Oct 20, 2018 7:06 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Thank you, kind sir. :)

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: UAC Prompt not Focused
PostPosted: Sat Oct 20, 2018 8:11 pm 
Offline
User avatar

Joined: Fri Jan 29, 2016 11:02 am
Posts: 119
Location: Seattle, WA
But of course. :)


Back to top
 Profile  
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 7 posts ]
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: No registered users and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron