I'm trying to find a way to run CMD commands as Administrator in my C++ code.
i.e:
system("taskkill /im mygame.exe");
This won't work and it will pop up an "Error: Access Denied" Message. If I run Windows CMD as Admin and execute the same command directly, it will work perfectly.
So what would be a way to use CMD as Administrator automatically in C++?
I've read some other threads on here but nothing I can directly relate/ get from them.
Examples are very appreciated.