简体   繁体   English

如何在Windows下用C ++代码创建新进程?

[英]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. 感谢任何人的帮助。

CreateProcessShellExecute都是可行的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM