Post by Don Kuenz, KB7RPUMy question is how to configure W10P and W16S to consistently display
"This task will be created with administrative privileges." when WinKey
R is entered?
Adhoc research indicates that although W7P defaults to RunAsAdmin mode,
it's hit-or-miss with W10P, and not available on W16S. Various websites
returned by Inet searches suggest policy tweaks using secpol.msc,
gpmc.msc, etc., that ultimately fail. At least one website advocates
setting bit 6 of byte 0x15 in Run.lnk to force Shortcut->Advanced->
"Run As Administrator." That too fails.
Is UAC turned on or completely off?
Are you logged into a Windows account that has administrator privileges?
There is a keyboard shortcut. Use Win+R to enter the command line but
don't yet hit Enter. Use Ctrl+Shift+Enter and confirm the UAC prompt to
run, and it runs with admin privs. The default will still be to run the
program without admin privs (unless Windows protection triggers the UAC
prompt, like for regedit.exe), so you'll have to remember to use
Ctrl+Shift+Enter in the Win+R dialog when you want a normally non-admin
program to instead run with admin privs.
In Windows 10, you can use its Task Manager. After opening Task
Manager, use its File -> New Task menu. That dialog includes an option
to run with admin privs.
I have the Home edition, so no policy editors to check if the following
would help you. You said you have the Pro edition (which I assume you
meant by "W10P"). Run secpol.msc. Navigate to Local Policies ->
Security Options -> "User Account Control: Use Admin Approval Mode for
the built-in Administrator account", and enable it. If that doesn't
work, see what happens when you disable the "User Account: Run all
administrators in Admin Approval Mode". After changing the policy, and
to effect the registry change, logout and back in or reboot (don't
remember which is needed). All policies are registry entries.
According to someone else, they say the 2nd policy mentioned above
effects the following registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Data item: EnableLUA
Data value: 0 or 1 (disable the enable, enable the enable).
You could also click on the search icon in the taskbar and enter cmd.
For the Command Prompt item, there is a right-pane of options, like Run
as Administrator. Alternatively, load Task Manager, open its File menu,
and hold down the Ctrl key when clicking on New Task. Load cmd w/admin
privs, and then enter whatever program you want to run w/admin privs.
If the program is listed in the Start menu, hit the Win key alone to get
the Start menu and start entering the name of the program. A right-pane
will show the option to run as admin (although there may be so many
options in the jump list that you'll have to click on the downward
chevron to see the run as admin entry).
If you want a program to always run with admin privs, right-click on it
in File Explorer, select Properties from the context menu, select the
Compatibility tab, optionally select "Change settings for all users" if
you want all users to get admin privs on this program, select "Run with
administrative privileges", and Apply and okay your way out.
Alternatively, and if you have a shortcut to the program on your
desktop, right-click on the shortcut, Properties, Compatibility tab, and
select to run with admin privs. When you use Win+R finds the shortcut
and will run that shortcut's program under its Compatibility settings.
If the program is in the alphabetical list in the Start menu, you can
right-click on the program's entry there, select More, and run with
admin privs (but this method is temporary when you load that instance of
the program).
Batch files (.bat) will have no Compatibility tab. You'll have to
create a shortcut to them, set Compatibility on the shortcut to run with
admin privs, and use the shortcut. Some old programs, like those for
XP, won't have a compatibility tab, or the program set to use admin
privs is used to load another program which doesn't start with admin
privs (games do this for protection). You can use the Windows
Application Compatibility Toolkit to create an application compatibility
shim (https://www.microsoft.com/en-us/download/details.aspx?id=7352). I
have an old game that must run under Windows XP compatibility mode which
results in the UAC prompt appearing. I could use ACT to eliminate the
prompt (without disabling UAC) but the nuisance hasn't been bad enough
for me to expend the effort to create the shim for this old game. Also,
you cannot mark system programs or processes to always run with admin
privs. That option is only available for non-system programs.