3

I have writen my code but i have to make a file copy to startup located in C: for which i need to have administrator request. So, can you help me to get administrator access using the non-administrator command line. Is there any command to get there?

Krishna Chalise
  • 147
  • 1
  • 15
  • 1
    possible duplicate of [How to request Administrator access inside a batch file](http://stackoverflow.com/questions/1894967/how-to-request-administrator-access-inside-a-batch-file) – JosefZ Sep 19 '15 at 10:05

1 Answers1

1

For example, the administrator account is AAA and you want to run BBB.exe of C:\programs, you should do these following 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.

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85