![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programming Guru
![]() ![]() ![]() |
try this:
#include <iostream>
using namespace std;
int main (void)
{
string x = "CMD /C yourCommandHere";
system(x.c_str());
return 0;
}
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#12 | |
|
Programmer
Join Date: Feb 2005
Posts: 41
Rep Power: 0
![]() |
??
Quote:
My C application does not have a window, but still I need call it by passing 3 parameters, what I did was a .bat file calling the C program passing these parameters like this: C:\program.exe par1 par2 par3 But when I execute this .bat file it comes up with the DOS window.... and that is what I dont want to happen. Maybe Im doing it wrong... is the .bat file the best way? Thx again. |
|
|
|
|
|
|
#13 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
You could always make a shortcut.
|
|
|
|
|
|
#14 |
|
Programmer
Join Date: Feb 2005
Posts: 41
Rep Power: 0
![]() |
Short cut???
|
|
|
|
|
|
#15 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Yeah... you know... right-click -> New -> Shortcut...
|
|
|
|
|
|
#16 |
|
Programmer
Join Date: Feb 2005
Posts: 41
Rep Power: 0
![]() |
Ohhh I see, yes, OMG, simple and nice.... thx, but I still have the DOS window poping up.... I have to run it on the background...
|
|
|
|
|
|
#17 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Like Eggbert said, you need to create a Win32 application. Try checking out www.functionx.com.
|
|
|
|
|
|
#18 | |
|
Programmer
Join Date: Feb 2005
Posts: 41
Rep Power: 0
![]() |
Wow
Quote:
Well, I think I figured out how to do it. Ill try to use the freeconsole() command on my script, wich it will be called by the .bat file that close itself and the C programm wont stop. Ill see and let you know. thx again. |
|
|
|
|
|
|
#19 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Or you could just not use a batch file...
|
|
|
|
|
|
#20 | |
|
Programmer
Join Date: Feb 2005
Posts: 41
Rep Power: 0
![]() |
hmmm
Quote:
The freeconsole() worked just fine, but I cant manage to close the window by using CLS on the batch file. Got any better idea? Thx. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|