Ticker

6/recent/ticker-posts

Header Ads Widget

How do I run a program as admin through command line in windows?

Run command prompt as administrator programmatically C!

You can perform the following steps:

There is a DOS command you can use to run as administrator in command line:

  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 do these following steps(make sure that you use admin level account for this; if you haven’t one, firstly create one admin account).

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”

Post a Comment

0 Comments