0

How to run command on command prompt as admin through c++ program. I used ShellExecute(), but it does not run command on command prompt as admin.

ShellExecute(NULL, _T("open"), _T("C:\\vss\\vshadow-2008-x64.exe"), NULL, NULL, SW_SHOWDEFAULT);

And how to capture the output from the command prompt as admin to the string.

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
akshay
  • 1
  • 2
  • 1
    Possible duplicate of [How can I run a child process that requires elevation and wait?](http://stackoverflow.com/questions/4893262/how-can-i-run-a-child-process-that-requires-elevation-and-wait) – DJMcMayhem Mar 08 '16 at 03:56
  • @DJ: probably not, as the other OP didn't need the output from the child process, which significantly complicates things. (I have a feeling there *is* a duplicate somewhere, though.) – Harry Johnston Mar 08 '16 at 09:54

0 Answers0