I want to make a program that runs a command in cmd, but as an administrator, But i'm having hard time understanding how to do it.
I've tried changing my program startup properties to start as an administrator but it still didn't work, when i called system() it wasn't administrator.
I tried this this solution which I saw here
system("runas /user:<admin-user> \"program.exe\"");
But i dont undertand how am i suppose to run commands with it like:
system("runas /user:<admin-user> \" COMMAND HERE? \"");
when I tried running the solution in cmd i got error saying the file specific as not found
In addition i am trying to do this project avoiding CreateProcess. Thank you