如何从Win 32控制台应用程序调用另一个exe? [英] How to call another exe from win 32 console app?

查看:433
本文介绍了如何从Win 32控制台应用程序调用另一个exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从Win 32控制台应用程序调用另一个exe?我已使用Shell execute进行调用?
但是,当它返回后在cmd提示符下运行控制台应用程序时..被调用的应用程序也正在关闭..我想从控制台应用程序中调用一个exe,并且如果控制台应用程序关闭,则该exe应该独立运行.

How to call another exe from win 32 console app?I have used shell execute to call?
But while running the console app in cmd prompt after it returns.. the called app is also closing.. I would like to call an exe from a console app and the exe should run independently if the console app gets closed. Also for the exe to run as administrator and background -bg parameter to run as service?

推荐答案

对进程执行具有更多控制权的函数是CreateProcess,是否还可以使exe以管理员身份运行,而后台-bg参数以服务身份运行?删除MSDN上的文档 [ ^ .
The function that gives more control on process execution is CreateProcess, check out the documentation at MSDN[^] for the details.


http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx [

这篇关于如何从Win 32控制台应用程序调用另一个exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆