开发者

How to Run(launch) elevated command prompt programmatically in Vista

开发者 https://www.devze.com 2022-12-12 17:57 出处:网络
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

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


ShellExecute(NULL, L"runas", ...);

For whatever reason the "runas" verb isn't documented in MSDN but...

0

精彩评论

暂无评论...
验证码 换一张
取 消