CreateProcess( );
-
I'm trying to get my App to luanch a program, like Quake 3. using CreateProcess(); I got two problems.. One is that Quake 3 looks for a default.cfg in the Defualt dir, but my program changes the defualt dir to the path to my program, so Quake 3 thinks that the default.cfg file is located where my program is located, but it is not. the second problem is that I can't include consol commands.. like "d:\games\half-life\hl.exe -game cstrike" This won't work.. code: CreateProcess( NULL,Game[0].Path,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi ); Any solution to these two problems? Thanks
-
I'm trying to get my App to luanch a program, like Quake 3. using CreateProcess(); I got two problems.. One is that Quake 3 looks for a default.cfg in the Defualt dir, but my program changes the defualt dir to the path to my program, so Quake 3 thinks that the default.cfg file is located where my program is located, but it is not. the second problem is that I can't include consol commands.. like "d:\games\half-life\hl.exe -game cstrike" This won't work.. code: CreateProcess( NULL,Game[0].Path,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi ); Any solution to these two problems? Thanks
-
I'm trying to get my App to luanch a program, like Quake 3. using CreateProcess(); I got two problems.. One is that Quake 3 looks for a default.cfg in the Defualt dir, but my program changes the defualt dir to the path to my program, so Quake 3 thinks that the default.cfg file is located where my program is located, but it is not. the second problem is that I can't include consol commands.. like "d:\games\half-life\hl.exe -game cstrike" This won't work.. code: CreateProcess( NULL,Game[0].Path,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi ); Any solution to these two problems? Thanks
-
You can use the APIs like SetCurrentDirectory to change the current working directory of your program Samir Sood
yeah, But if I have a string like: "d:\games\quake3\quake3.exe" and want to set the currentdir like: SetCurrentDirectory("d:\games\quake3\quake3.exe") I need to remove the quake3.exe but how?.
-
Instead of copying MSDN article, just post a link next time. Tomasz Sowinski -- http://www.shooltz.com
- It's for protection
- Protection from what? Zee Germans? -
Ok I see. But I need a function that returns the path of the file. Like 'd:\games\quake 3\quake3.exe' will return 'd:\games\quake 3\' Any function that does this? thanks.
-
Ok I see. But I need a function that returns the path of the file. Like 'd:\games\quake 3\quake3.exe' will return 'd:\games\quake 3\' Any function that does this? thanks.
Visual Basic is great for things like that :-D Tomasz Sowinski -- http://www.shooltz.com
- It's for protection
- Protection from what? Zee Germans? -
Ok I see. But I need a function that returns the path of the file. Like 'd:\games\quake 3\quake3.exe' will return 'd:\games\quake 3\' Any function that does this? thanks.
-
Ok I see. But I need a function that returns the path of the file. Like 'd:\games\quake 3\quake3.exe' will return 'd:\games\quake 3\' Any function that does this? thanks.