如何以管理员身份运行cmd并向其传递命令?
可能的重复:
要以管理员身份运行 cmd 和命令吗?
我想要使用管理员权限运行cmd 然后将命令传递给以管理员身份运行 cmd 的进程。
我不想使用 proc.standardinput 来传递命令还有其他方法吗?
Possible Duplicate:
To run cmd as administrator along with command?
I want to run a cmd using administrator privileges
and then pass the command to the process that is running cmd as administrator.
I don't want to use proc.standardinput to pass the command is there any other method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用 advapi32.dll CreateProcessAsUser 中的下一个 api 函数
You need to use the next api function from advapi32.dll CreateProcessAsUser