i want to make an exe..

i want to make an exe to open aonther exe
reading it from path like \test\test.exe
then this applaction close its self
can i do that using C++?
Last edited on
If all you are trying to do is just launch another process, and don't need any sort of fine control over it, you can look into the _spawn methods in the process.h header
http://msdn.microsoft.com/en-us/library/20y988d2%28v=VS.80%29.aspx

If you want to do more advanced thing with your processes while its running such as running it in the background, querying performance, setting security, synchronizing or whatever, you would need to look into native OS calls to accomplish that. For example, on a Windows machine, you could use the CreateProcess method in the Windows.h header
http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx

Edit:
Just realized something in your question, if you are suggesting that you wish for your application to start another process, then have your application close while the other process continues to run, the _exec functions do exactly this.
http://msdn.microsoft.com/en-us/library/431x4c1w%28VS.80%29.aspx
Last edited on
Topic archived. No new replies allowed.