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?
Asked
Active
Viewed 780 times
3
-
1possible 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 Answers
1
For example, the administrator account is AAA and you want to run BBB.exe of
C:\programs, you should do these following steps:
- Press Win key & R
- Input
CMDin open box and clickOK - Input:
runas /profile /user:AAA “C:\programs\BBB.exeand pressEnter - Input the password of administrator
AAA - Press
Enter.
Hope it works.
Abdulla Nilam
- 36,589
- 17
- 64
- 85
-
-
You could perhaps change the `“C:\programs\BBB.exe` to `cmd` so that he will have a command line with administrative access. – MCSH Sep 22 '15 at 21:33