How to run cmd with Admin privileges using command line

Solution 1:

runas /profile /user:administrator “Driver:\folder\program”

For example, the administrator account is “AAA” and you want to run BBB.exe of C:\programs, you should follow these steps:

  1. Press Win key & R
  2. Input “CMD” in open box and click “OK”
  3. Input: runas /profile /user:AAA “C:\programs\BBB.exe” and press “Enter”
  4. Input the password of administrator AAA
  5. Press “Enter”

Hope it works.

Solution 2:

You can use runas.exe /savecred /user:administrator cmdor refer this link