0

When I launch Command line in Windows 7 with a unelevated administrator it with administrator rights by default, i.e without click on "Run as Administrator" option.

But in Windows 8 unelevated administrator user it launches it without administrator rights.

I checked and windows 7 elevated administrator is disabled.

The effect of the difference is that I can not run commands in cmd from a Java application because I get an error of "Access denied". However in Windows 7 it executes commands correctly.

It does not relate to Turn Off UAC because I have tried that.

How can I make windows 8 run cmd with administrator rights by default in unelevated admin user?

2
  • 1
    IMHO that is not right: windows 7's administrator unelevated user DOES NOT have CMD administrator rights by default Oct 23, 2015 at 9:17
  • The reason it works in 7 is you are likely are a elevated administrator and you were running Java as administrator too (If you are an administrative user and you have UAC disabled all programs run as administrator, you can't be un-elevated) Oct 24, 2015 at 6:17

2 Answers 2

4

You're working with an incorrect premise: all Windows OSes since Vista will not elevate the command prompt without a UAC prompt under normal circumstances.

Typical situations where you'll get an elevated command prompt without additional prompting include:

  • When UAC is turned off.
  • When you are logged into an account that is not affected by UAC (i.e. the built-in account named Administrator, which is disabled by default). All other accounts in the Administrators group are normally in a medium integrity level, with the ability to elevate to a high integrity level under their own account -- i.e. without password prompt but with UAC confirmation.
  • When you have previously configured auto-elevation through one of the typical methods, e.g. a scheduled task (with a shortcut to start the task) or a service that launches the program for you.

Windows 8 behaves exactly the same as Windows 7 when it comes to user privilege levels and UAC elevation.

2

If you moved the UAC control slider down to the bottom in Windows 7, the UAC is turned off, while moving it down in Windows 8 still leaves UAC on. This is required to run the new store apps. The sandbox of the store apps is based on the UAC.

This is why you see a different behavior.

1
  • Ah, I was not aware that the UI did not expose all options. Still, judging by the comments here, directly editing the relevant registry entry might work. Still not really recommended, though.
    – Bob
    Oct 24, 2015 at 6:18

Not the answer you're looking for? Browse other questions tagged .