Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I start .exe in c++

Status
Not open for further replies.

TekMem

Programmer
Jul 23, 2004
98
CA
I have created programs in vb.net and vb 6. Can i start those programs myvbnet.exe and vb.exe using c++ codes.

Thanks.
 
Code:
#include <cstdlib>

int main()
{
   // Replace 'path' with the location of these files.
   system( "path/myvbnet.exe" );
   system( "path/vb.exe" );

   return 0;
}
 
Thank you cpjust!
Is there a problem if my folder has space.
"C:/Program Files/dlltest/dlltest.exe"

If yes, is there any solution for that?
Cannot move exe from Program files.
 
I'm not sure, but if you try it and it gives you problems, you can put quotes around it with \"
Code:
system( "\"C:/Program Files/dlltest/dlltest.txt\"" );
 
I am sorry but I cannot make it work.

 
There is no error, also it does not execute.
 
Can you post the code you are using?
Put the code inside [ignore]
Code:
[/ignore] tags.
 
Better try to start dlltest.exe, not dlltest.txt.
Use "..." as cpjust said.
 
Thanks guys !
That was a typo. I was really trying to create a dll and trying to open exe from there. some how it was not executing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top