Apps start as ADMIN don't get focus and foreground
Apps start as ADMIN don't get focus and foreground
Hi,
I love this tool, very fast and efficient. I made it my default launcher for the apps links in %APPDATA%\Microsoft\Windows\Start Menu\Programs too. It works great except for the app that are set to start as ADMIN: then UAC popup only flash and blink in Windows taskbar instead of being brought to the foreground. Hence user will have to use mouse or ALT+TAB to set focus on it and bring it on the top.
This will happen if Windows UAC setting is set as default (use the secure desktop). If UAC is set to not use secure desktop, the popup will be on top but keyboard won't be used to select button, mouse only (windows feature that can be changed).
If the same app is launch via the Windows startup menu search WIN+S, everything work as intended. Same if it is launched from Windows File Explorer or DOpus file Explorer or from CMD.EXE with just "%APPDATA%\Microsoft\Windows\Windows\Start Menu\Path to Some App.lnk"
I don't know it will be possible but it would be a great feature if it could work the same in Everything. Now, it is a little frustrating to have to remember to use start menu to launch admin apps.
Regards
Setup: Alway last Everything version, Windows 10 x64 (french)
I love this tool, very fast and efficient. I made it my default launcher for the apps links in %APPDATA%\Microsoft\Windows\Start Menu\Programs too. It works great except for the app that are set to start as ADMIN: then UAC popup only flash and blink in Windows taskbar instead of being brought to the foreground. Hence user will have to use mouse or ALT+TAB to set focus on it and bring it on the top.
This will happen if Windows UAC setting is set as default (use the secure desktop). If UAC is set to not use secure desktop, the popup will be on top but keyboard won't be used to select button, mouse only (windows feature that can be changed).
If the same app is launch via the Windows startup menu search WIN+S, everything work as intended. Same if it is launched from Windows File Explorer or DOpus file Explorer or from CMD.EXE with just "%APPDATA%\Microsoft\Windows\Windows\Start Menu\Path to Some App.lnk"
I don't know it will be possible but it would be a great feature if it could work the same in Everything. Now, it is a little frustrating to have to remember to use start menu to launch admin apps.
Regards
Setup: Alway last Everything version, Windows 10 x64 (french)
Re: Apps start as ADMIN don't get focus and foreground
Thanks for bringing this bug to my attention.
When opening a file in Everything, Everything would try the "open" verb first (since Everything 817b) and if that failed, it would fall back to the null verb (default verb).
Before Everything 817b, Everything would use the null verb.
I've reverted back to using the null verb to open files with Everything 854b.
Should be fixed in Everything 854b or later.
When opening a file in Everything, Everything would try the "open" verb first (since Everything 817b) and if that failed, it would fall back to the null verb (default verb).
Before Everything 817b, Everything would use the null verb.
I've reverted back to using the null verb to open files with Everything 854b.
Should be fixed in Everything 854b or later.
Re: Apps start as ADMIN don't get focus and foreground
I installed the 1.4.1.854b (x64) and unfortunately, nothing changed. Would be there a setting to enable/disable?
Re: Apps start as ADMIN don't get focus and foreground
The only workaround for now is to start Everything as admin, then every app launched as admin won't need to prompt UAC popup and start as any other standard apps.
-
- Posts: 79
- Joined: Sun Jul 13, 2014 12:20 am
Re: Apps start as ADMIN don't get focus and foreground
Fred (or anyone), could you explain what you mean by using Everything as your default app launcher for app links in %AppData%? Does this mean just opening a new instance of Everything and searching for an "App*.lnk"? I'm curious how this works, particularly if it's more than merely searching for a program shortcut.fred_gaou wrote:Hi,
I love this tool, very fast and efficient. I made it my default launcher for the apps links in %APPDATA%\Microsoft\Windows\Start Menu\Programs too. It works great except for the app that are set to start as ADMIN: then UAC popup only flash and blink in Windows taskbar instead of being brought to the foreground. Hence user will have to use mouse or ALT+TAB to set focus on it and bring it on the top.
This will happen if Windows UAC setting is set as default (use the secure desktop). If UAC is set to not use secure desktop, the popup will be on top but keyboard won't be used to select button, mouse only (windows feature that can be changed).
If the same app is launch via the Windows startup menu search WIN+S, everything work as intended. Same if it is launched from Windows File Explorer or DOpus file Explorer or from CMD.EXE with just "%APPDATA%\Microsoft\Windows\Windows\Start Menu\Path to Some App.lnk"
I don't know it will be possible but it would be a great feature if it could work the same in Everything. Now, it is a little frustrating to have to remember to use start menu to launch admin apps.
Regards
Setup: Alway last Everything version, Windows 10 x64 (french)
Re: Apps start as ADMIN don't get focus and foreground
This is the achieved RESULTS of what I meanColdblackice wrote:Fred (or anyone), could you explain what you mean by using Everything as your default app launcher for app links in %AppData%? Does this mean just opening a new instance of Everything and searching for an "App*.lnk"? I'm curious how this works, particularly if it's more than merely searching for a program shortcut.
When I press Win+N or click on the Everything tray icon, the Everything window start with an Apps filter as default that list only program shortcuts. This way it's quick to start my programs.
But if I need to search for any other things than programs, I just press Ctrl+A to remove the filter and see everything.
Here is my personal settings for that.
Set the needed filters
Create a filter named Apps
Set search pattern as : "exact:type:Shortcut "%APPDATA%\Microsoft\Windows\Start Menu\Programs"|"%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs"
Macro : ap
Note
- Replace Shortcut with the valid locale value (it's Raccourci for french).
- Replace %APPDATA% with C:\Users\{username}\AppData\Roaming
- Replace %SystemDrive% with the drive letter where Windows is installed (should be C:)
------------------
Edit or create the filter named Everything
Set the keyboard shortcut as : Ctrl+A
Leave anything else with blank value.
Set the needed options
Indexes
Note: This my personal choices for indexes settings. Adapt to your own use, the important thing you have to care is that program shortcuts folders have to be indexed.
(Only if you need to exclude everything but the shortcuts program folders) In NTFS>Windows(C:)
include only checked and set %APPDATA%\Microsoft\Windows\Start Menu\Programs;%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs
(Required if the exclude checkbox set as below are checked) In Folders
Add the same folders as above.
In Exclude
Check all "Exclude box"
Put in Include only files (important is that it must contain all the file type you need to get included the *.lnk for shortcut):
*.bat;*.mkv;*.mp3;*.exe;*.avi;*.mp4;*.png;*.jpg;*.lnk;*.docx;*.pdf;*.xls;*.doc;*.gpx;*.txt;*.rtf;*.sln
General
In Home
- Search → Custom
- Filter → Apps
- View → Use last value
Toggle window hotkey → Win+N (or whatever you like)
Re: Apps start as ADMIN don't get focus and foreground
I'm having trouble replicating the issue here on 854b, I've tried with and without secure desktop. Both bring the UAC prompt into the foreground.
Everything 853b or earlier doesn't show the UAC prompt for me when run as admin is enabled on a lnk shortcut.
Could you please confirm 854b is running from Everything -> Help -> About.
If it is, could you please email me the verbose debug output when launching a shortcut that has run as admin enabled.
Hope I can help..
Everything 853b or earlier doesn't show the UAC prompt for me when run as admin is enabled on a lnk shortcut.
Could you please confirm 854b is running from Everything -> Help -> About.
If it is, could you please email me the verbose debug output when launching a shortcut that has run as admin enabled.
Hope I can help..
Re: Apps start as ADMIN don't get focus and foreground
I confirm using version 1.4.1.854b (x64) from the about dialog. I installed it as portable, service is running and I reboot after update. I found out an important detail: this behavior only occurs if you set the windows taskbar to auto hide. Now, you should succeed to replicate the issue. Else I will sent you the log.
In confirm that the issue only occurs with Everything because even if taskbar is auto hidden, I have no issue launching some *.lnk set to be run as admin with cmd.exe or via a simple batch such as:
or with WIN+R then execute "%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt [ADMIN].lnk"
or with explorer.exe or dopus.exe, etc.
Secure desktop is triggered and UAC pop up normally.
Tell me if you still can not reproduce the issue.
In confirm that the issue only occurs with Everything because even if taskbar is auto hidden, I have no issue launching some *.lnk set to be run as admin with cmd.exe or via a simple batch such as:
Code: Select all
@echo off
"%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt [ADMIN].lnk"
pause
exit
or with explorer.exe or dopus.exe, etc.
Secure desktop is triggered and UAC pop up normally.
Tell me if you still can not reproduce the issue.
Re: Apps start as ADMIN don't get focus and foreground
No luck sorry, I still get the UAC prompt in a secure desktop.
Edit:
Requirements for Administrator Applications
Use the HWND Property to Be Acknowledged as a Foreground Application
https://msdn.microsoft.com/en-us/library/bb756922.aspx
Everything is correctly using the HWND property as far as I can see, is Everything the foreground application when you run a shortcut with run as admin enabled?
Edit:
Requirements for Administrator Applications
Use the HWND Property to Be Acknowledged as a Foreground Application
https://msdn.microsoft.com/en-us/library/bb756922.aspx
Everything is correctly using the HWND property as far as I can see, is Everything the foreground application when you run a shortcut with run as admin enabled?
Re: Apps start as ADMIN don't get focus and foreground
I run those lnk file directly from Everything with [enter] key so yes, it's the foreground window at that time. I will send you log.
I'm on Win 10 pro x64 french by the way.
I'm on Win 10 pro x64 french by the way.
Re: Apps start as ADMIN don't get focus and foreground
Log sent now.
Run the admin shortcut start at line 21 237.
Run the admin shortcut start at line 21 237.
Re: Apps start as ADMIN don't get focus and foreground
Thanks for the debug log.
The log looks fine, I can't find anything in the log to determine the issue.
What happens if you right click the lnk and click Run as administrator? Is the UAC prompt in the foreground?
Does the problem occur if Always on top is active? (Toggle from View -> On Top -> Always)
In Everything 855b, Everything will make sure the UI window is the foreground window and the top most window before calling ShellExecute.
The log looks fine, I can't find anything in the log to determine the issue.
What happens if you right click the lnk and click Run as administrator? Is the UAC prompt in the foreground?
Does the problem occur if Always on top is active? (Toggle from View -> On Top -> Always)
In Everything 855b, Everything will make sure the UI window is the foreground window and the top most window before calling ShellExecute.
Re: Apps start as ADMIN don't get focus and foreground
If I run as admin from the context menu in Everything it WORKS. I had not tried that before.
If Always on top is active, NO issue. Thanks. It's fixed with that.
If Always on top is active, NO issue. Thanks. It's fixed with that.
Re: Apps start as ADMIN don't get focus and foreground
It's not the best solution, does 855b help?If Always on top is active, NO issue. Thanks. It's fixed with that.
Looks like the UI window needs to be top most and the foreground window for UAC prompts to get foreground.
Re: Apps start as ADMIN don't get focus and foreground
With v854 with always on top enabled, it seems the issue was partially fixed because it happened again sometimes the UAC window was stuck in taskbar.
I'm pretty sure the issue was triggered if the taskbar is hidden (offscreen) AND if the taskbar is in background too i.e. when a window is maximized, for some reason, the taskbar may switch to the background (as if it was attached to desktop), behind that window and it can NOT be reached and enabled with the mouse. It's a windows 10 bug (maybe 8.1 too) that have never cared to fix. In that case (it happens a lot) I have to press the WIN keyboard key to call it back in foreground.
For now, even if the taskbar isn't reachable with mouse, it seems the issue with UAC popup is fixed with v855 because when I call Everything with my shortkey combination, now it bring the taskbar to the foreground while keeping it hidden (offscreen).
It really seems that the issue is fixed for good even if always on top is always off.
Good work !
Thanks
I'm pretty sure the issue was triggered if the taskbar is hidden (offscreen) AND if the taskbar is in background too i.e. when a window is maximized, for some reason, the taskbar may switch to the background (as if it was attached to desktop), behind that window and it can NOT be reached and enabled with the mouse. It's a windows 10 bug (maybe 8.1 too) that have never cared to fix. In that case (it happens a lot) I have to press the WIN keyboard key to call it back in foreground.
For now, even if the taskbar isn't reachable with mouse, it seems the issue with UAC popup is fixed with v855 because when I call Everything with my shortkey combination, now it bring the taskbar to the foreground while keeping it hidden (offscreen).
It really seems that the issue is fixed for good even if always on top is always off.
Good work !
Thanks
-
- Posts: 79
- Joined: Sun Jul 13, 2014 12:20 am
Re: Apps start as ADMIN don't get focus and foreground
Awesome! Thanks for sharing, and with details. Going to try this myself.fred_gaou wrote:This is the achieved RESULTS of what I meanColdblackice wrote:Fred (or anyone), could you explain what you mean by using Everything as your default app launcher for app links in %AppData%? Does this mean just opening a new instance of Everything and searching for an "App*.lnk"? I'm curious how this works, particularly if it's more than merely searching for a program shortcut.
When I press Win+N or click on the Everything tray icon, the Everything window start with an Apps filter as default that list only program shortcuts. This way it's quick to start my programs.
But if I need to search for any other things than programs, I just press Ctrl+A to remove the filter and see everything.
Here is my personal settings for that.
Set the needed filters
Create a filter named Apps
Set search pattern as : "exact:type:Shortcut "%APPDATA%\Microsoft\Windows\Start Menu\Programs"|"%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs"
Macro : ap
NoteYou can use the Advanced search to help yourself to create your own search/filter pattern that will point to the programs shortcuts folders.
- Replace Shortcut with the valid locale value (it's Raccourci for french).
- Replace %APPDATA% with C:\Users\{username}\AppData\Roaming
- Replace %SystemDrive% with the drive letter where Windows is installed (should be C:)
------------------
Edit or create the filter named Everything
Set the keyboard shortcut as : Ctrl+A
Leave anything else with blank value.
Set the needed options
Indexes
Note: This my personal choices for indexes settings. Adapt to your own use, the important thing you have to care is that program shortcuts folders have to be indexed.
(Only if you need to exclude everything but the shortcuts program folders) In NTFS>Windows(C:)
include only checked and set %APPDATA%\Microsoft\Windows\Start Menu\Programs;%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs
(Required if the exclude checkbox set as below are checked) In Folders
Add the same folders as above.
In Exclude
Check all "Exclude box"
Put in Include only files (important is that it must contain all the file type you need to get included the *.lnk for shortcut):
*.bat;*.mkv;*.mp3;*.exe;*.avi;*.mp4;*.png;*.jpg;*.lnk;*.docx;*.pdf;*.xls;*.doc;*.gpx;*.txt;*.rtf;*.sln
General
In HomeIn Keyboard
- Search → Custom
- Filter → Apps
- View → Use last value
Toggle window hotkey → Win+N (or whatever you like)
Re: Apps start as ADMIN don't get focus and foreground
Menu:View > On Top > Never | Always | While Searching.Bledsoe wrote:How do you turn always on top on?
This corresponds with INI setting ontop=0|1|2 (resp.)
Re: Apps start as ADMIN don't get focus and foreground
Just to let you know this bug that had been fixed in 1.4 is back in the last 1.5.0.1371a (first alpha I test).
Re: Apps start as ADMIN don't get focus and foreground
Everything 1.5 will open items with IContextMenu::InvokeCommand
Does the issue persist if you disable shell_execute_invoke_id_list:
Does the issue persist if you disable shell_execute_invoke_id_list:
- In Everything 1.5, from the Tools menu, click Options.
- Click the Advanced tab on the left.
- To the right of Show settings containing, search for:
invoke - Select: shell_execute_invoke_id_list
- Set the value to: false
- Click OK.
Re: Apps start as ADMIN don't get focus and foreground
Thanks. It did the trick.
Re: Apps start as ADMIN don't get focus and foreground
I'm curious, do you see the same issue from Windows Explorer?
Do you see the same issue if you right click the file and click Open in Windows Explorer?
Do you see the same issue if you right click the file and click Open in Everything?
Do you see the same issue if you right click the file and click Open in Windows Explorer?
Do you see the same issue if you right click the file and click Open in Everything?
Re: Apps start as ADMIN don't get focus and foreground
No issue in explorer with right click but yes in everything with right click or not.
Re: Apps start as ADMIN don't get focus and foreground
Thank you for the information.
I would like to do more testing my end, but I am having trouble reproducing the issue.
What version of Windows and what UAC prompt settings are you using?
I would like to do more testing my end, but I am having trouble reproducing the issue.
What version of Windows and what UAC prompt settings are you using?
Re: Apps start as ADMIN don't get focus and foreground
Windows 10 pro 22H2 (19045.4170)