[英]How to create a new process in C++ code under Windows?
Can anybody answer me the question of how to create a new process from within C++ code with specific parameters for that process under windows ? 有人可以回答我一个问题,如何在Windows下用C ++代码为该过程创建具有特定参数的新过程吗? eg how to execute 例如如何执行
"C:\\Program Files (x86)\\WinRAR\\UnRAR.exe" “ C:\\ Program Files(x86)\\ WinRAR \\ UnRAR.exe”
with some arguments ? 有一些争论吗? or how to execute "reg import myRegEntry.reg" ? 或如何执行“ reg import myRegEntry.reg”?
I like explanations, but sometimes examples are better. 我喜欢解释,但有时示例会更好。 I would be very thankfull for both 我将非常感谢
Thanks for anybody's help. 感谢任何人的帮助。
Hope this helps: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx 希望对您有所帮助: http : //msdn.microsoft.com/zh-cn/library/windows/desktop/ms682425(v=vs.85).aspx
It is explained quite detailed. 解释得很详细。
CreateProcess
和ShellExecute
都是可行的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.