30

Is there anyway to enable administrator access instead of having to right click command prompt and run as administrator?

I tried runas /user:administrator CMD (prompts for password) net user administrator /active:yes (System error 5 has occurred. Access is denied.) runas /user:administrator luaexec.exe -w -f cmd.exe /k

This is on my local machine running windows 8 and have no passwords on any accounts

nhat
  • 433

3 Answers3

7

You can't change the permission from a current CMD.exe. You have to restart it. This is a Windows limitation. I use NirCmd with the elevate switch to start tools elevated.

0

It is not built in to Windows, but you could use the psexec command from PsTools:

psexec -h cmd
0

Try the following.

  1. Locate the command prompt (cmd.exe).
  2. Right click on the file, go to Send To - Desktop (create shortcut). enter image description here
  3. Right click on the file again and go to Properties.
  4. The target field put:

    C:\Windows\System32\runas.exe /noprofile /user:Administrator cmd

  5. Open the shortcut, the following screen will be presented to you. enter image description here
stderr
  • 10,569
  • 2
  • 36
  • 50