i know i know, how to run a exe from inside a program is in the faq but i need to know how to run one that is in a different directory than the one the program is running in. Im using the system() commad.
(please help)
Skeptic
Printable View
i know i know, how to run a exe from inside a program is in the faq but i need to know how to run one that is in a different directory than the one the program is running in. Im using the system() commad.
(please help)
Skeptic
This probally involves adding something to your path, so that the system knows where else to look.
well i tried things like
system("c:\mydir\myprogram.exe")
but it didnt work
or if its a few directories back,Code:system("Dir1/Dir2/myfile.dat");
Code:system("..\..\dir1\myfile.dat");
I think you can do it that way
i should change my name to stupid, i had the wrong slashes.
Wha? That has never mattered for me.....
Maybe i have never tried them both =)
is there a way to call two programs at the same time, with out waiting for the first one to close?
\ signals an escape sequence \n, \a, \t, \", etc. In order to produce a \ you'd use \\.
So:
system( "C:\\filename" );
\\ doesnt seem to work the program still waits till the first is closed then runs the second
If you're trying to run two programs then you need to look into multi-threading. Using the system call won't cut it.