Ctrl+Shift+Enter to "Run as Admin" works on "Desktop app" programs but not "Run command" programs

7

3

Main Question

Standalone .exe utility programs that I have on my computer, when run from the Start menu using the Ctrl+Shift+Enter keyboard shortcut, do not as administrator. Instead, the program just runs without displaying the UAC prompt, and without elevated permissions.

Certain programs that are built into Windows, such as notepad.exe, do respect the Ctrl+Shift+Enter keyboard shortcut to run them as admin.

How can I get standalone .exe utility programs which display in the Windows Start menu as "Run command", not as "Desktop app", to run with administrator permissions when run from the Start menu with Ctrl+Shift+Enter?

Background / More Info

At first, I thought the problem was that the Ctrl+Shift+Enter keyboard shortcut to run a program as admin from the Start Menu wasn't working at all on my new PC running Windows 10.

After some experimentation, I noticed that Ctrl+Shift+Enter to run as admin does work for programs which are labeled in the Start Menu as "Desktop app", for example, "Notepad":

Windows 10 "Desktop app" in Start Menu

However, for a custom .exe utility programs which I'd copied directly onto my local drive without running an installer program, Windows 10's Start Menu labels as "Run command", and Ctrl+Shift+Enter does not run them as admin; it just runs them without a UAC dialog and without elevated permissions:

enter image description here

As noted above, what I'm after is to get installerless utility .exe programs like BoundsTest.exe to run as admin from the Start menu on a press of Ctrl+Shift+Enter, without having to resort to (slightly) more cumbersome means like right-clicking on the program and selecting "Run as administrator" (which does work).

So, how can I accomplish either or both of:

  1. Get Windows 10 to treat/recognize a given "Run command" program as a "Desktop app" program instead?
  2. Configure Windows 10 to allow Ctrl+Shift+Enter to run "Run command" programs as administrator?

Jon Schneider

Posted 2017-03-16T18:24:42.110

Reputation: 893

—"Programs that are built into Windows, such as notepad.exe, do respect the Ctrl+Shift+Enter keyboard shortcut to run them as admin." That's not true in my test. NSLOOKUP, IPCONFIG and NETSH do not respect the key combination. Then again, NSLOOKUP does not have a shortcut in the Start menu. – None – 2017-03-16T18:29:24.927

Good catch: Apparently "built into Windows" is not the same as "Desktop app". Tried on my Windows 10 just now: NSLOOKUP is shown on the Start Menu as a "Run command", not a "Desktop app". I'll edit appropriately. Thanks! – Jon Schneider – 2017-03-16T18:31:01.680

In my Start menu "ffmpeg prompt" shows up with the label "Desktop app" but does not respond to the Ctrl+Shift+Enter either. Because it is a .bat file not .exe. – None – 2017-03-16T18:35:37.627

I have solved this for myself using Ctrl+Alt+Enter (and additional typing-based launcher), but I don't know if your are interested. The principle of launching (incremental search, then launch) remains identical. – miroxlav – 2017-08-23T21:25:55.483

@miroxlav Maybe! What "typing-based launcher" do you mean? – Jon Schneider – 2017-08-23T21:27:43.417

Launchy. It scans all folders you choose – with exe tools or Start menu items or anything else. Then it provides you the same incremental typing experience as Start menu (or maybe with more advanced). And yes, if you run it as administrator, it launches all apps as administrator (tested). There are some additional steps to get maximum out of it, I can elaborate them in an answer, if you are interested. – miroxlav – 2017-08-23T21:33:46.493

@miroxlav Ah, ok. I'm hoping for a solution that doesn't involve 3rd-party software, but if none exists, a program like launchy might be the best answer to my problem. (I haven't needed a 3rd-party launcher app on Windows since the early Windows XP days! It'd be pretty weird to have to go back, but...) ¯\(ツ) – Jon Schneider – 2017-08-23T21:37:40.937

Sure. It depends on what is the priority in your question. Vanilla-Windows-only or getting the work done. If you wish, I can wait a day for two (maybe someone else solves that Windows puzzle) and then, if there is nothing, add Launchy workaround as an answer. – miroxlav – 2017-08-23T21:43:56.430

Answers

3

Add shortcut of your EXE file into Start menu (and launch the shortcut once).

This promotes item status labeled as Run command to Desktop app which enables use of Ctrl+Shift+Enter.

Details:

  1. Create shortcut to your EXE file and place it into your local Start menu: C:\Users\YourUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\
    (Alternative is placing it into Start menu for all users:
    C:\ProgramData\Microsoft\Windows\Start Menu\ in Windows 10)

  2. Open Start menu and locate the shortcut by navigating to it – not by typing, because by typing you will still get Run command label.

  3. Launch the shortcut.

  4. Now if you are typing to find the shortcut, it appears labeled as Desktop app.

  5. Use Ctrl+Shift+Enter to launch this app As Administrator.


Edit: based on Jon's comments it can be easier to select "Pin to Start" after right-clicking the EXE file. Valid shortcut (created by either way) subsequently creates registry key in HKCU\Software\Microsoft\Windows\CurrentVersion\‌​UFH\SHC which actually causes promotion of the item. The item can be subsequently removed from the Start menu, its recognition as Desktop app remains in place.

miroxlav

Posted 2017-03-16T18:24:42.110

Reputation: 9 376

1Very interesting technique! And it works! I found that on my Windows 10, doing this has the effect of creating a new registry value at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UFH\SHC – Jon Schneider – 2017-08-25T15:02:33.003

Alternative approach based on your technique that also works: Right-click the .exe file and select "Pin to Start", then (as in your technique) run it once. Afterwords, the pinned item can be removed, but Windows continues to treat the .exe program as a "Desktop app". – Jon Schneider – 2017-08-25T15:03:55.110

@JonSchneider – for me, "Pin to Start" does not work, it is getting ignored. Only making a shortcut in Start menu works as expected. – miroxlav – 2017-08-25T15:23:11.863

Fair enough, feel free to remove that from your answer since it isn't reliable. Thank you so much for your help with this problem, I'm excited to to finally have a way to get Ctrl+Shift+Enter to work reliably on Windows 10! :-D – Jon Schneider – 2017-08-25T15:25:15.370

@JonSchneider – if ti worked for you, maybe it will still work for someone :) Thank you for that finding of Registry key! And also for useful question, I added few shortcuts to few items in my Tools directory.

– miroxlav – 2017-08-25T15:29:21.397