nongio
17-01-2008, 14:29
Ciao a tutti...
Volevo farvi una domanda, Vorrei scrivere un programma (semplice, giusto da capire come si fa) che esegua un file .exe
ovvero, mettiamo che ho un un eseguibile in una cartella e io voglia lanciarlo tramite un altro programma...
#include <stdio.h>
FILE *stream;
int main ()
{
if ((stream=fopen("C:\Documents and Settings\nome utente \Documenti\programmazione\Struttura2\Debug\struttura2.exe", "a+"))==NULL)
{
printf("Impossibile aprire il file\n");
}
else
{
/* che devo scrivere per eseguirlo??*/;
}
return 0;
}
che fuinzione devo utilizzare per lanciare il file .exe??
grazie mille....
Volevo farvi una domanda, Vorrei scrivere un programma (semplice, giusto da capire come si fa) che esegua un file .exe
ovvero, mettiamo che ho un un eseguibile in una cartella e io voglia lanciarlo tramite un altro programma...
#include <stdio.h>
FILE *stream;
int main ()
{
if ((stream=fopen("C:\Documents and Settings\nome utente \Documenti\programmazione\Struttura2\Debug\struttura2.exe", "a+"))==NULL)
{
printf("Impossibile aprire il file\n");
}
else
{
/* che devo scrivere per eseguirlo??*/;
}
return 0;
}
che fuinzione devo utilizzare per lanciare il file .exe??
grazie mille....