Es funzt leider immer noch nicht. Hier ist mein Quellcode. Kannst ja mal nach dem Fehler gucken. Die Backslashs werden bestimmt wieder verschwunden sein, ich habe beim Pfad aber immer 2 genommen.
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
char *pfad;
if (RadioButton1->Checked==true)
pfad="C:\\Spiele\\Age of Empires II\\empires2.exe";
if (RadioButton2->Checked==true)
pfad="C:\\Spiele\\ANNO1602\\1602.exe";
if (RadioButton3->Checked==true)
pfad="C:\\Spiele\\Core Design\\Tomb Raider III\\tomb3.exe";
if (RadioButton4->Checked==true)
pfad="C:\\Spiele\\Dark Reign\\splash\\Splash.exe";
if (RadioButton5->Checked==true)
pfad="C:\\Spiele\\Doom2\\Doom2.exe";
if (RadioButton6->Checked==true)
pfad="C:\\Spiele\\MMV3\\intro.exe";
if (RadioButton7->Checked==true)
pfad="C:\\Spiele\\Monkey2_deu\\mi2sound.bat";
if (RadioButton8->Checked==true)
pfad="C:\\Spiele\\PoC\\pocgerm.exe";
if (RadioButton9->Checked==true)
pfad="C:\\Spiele\\Rollcage\\Direct3D\\Rollcage.exe";
if (pfad!="")
{
bool b;
STARTUPINFO si;
memset(&si, 0, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOW;
PROCESS_INFORMATION pi;
b = CreateProcess (NULL,
pfad,
NULL,
NULL,
true,
0,
0,
pfad,
&si,
&pi);
if (!b)
{
delete &si;
delete π
//PostQuitMessage(0);
//exit(0);
}
}
}