问题
I'm trying to install some files from a batch file (through code). However the command should only run as "elevated command" in Vista and Windows 7 Is there any way this can be done programitically?
I'm launching the batch file by calling "CreateProcess" in VC++/MFC code.
Thanks
回答1:
ShellExecute(NULL, L"runas", ...);
For whatever reason the "runas" verb isn't documented in MSDN but...
来源:https://stackoverflow.com/questions/1797695/how-to-runlaunch-elevated-command-prompt-programmatically-in-vista