Run Conquer directly

11/11/2010 01:03 TomasLT#1
Hi guys. Still makeing my proxy and now i need somehow load conquer. When i try run conquer with blacknull argument in shortcut everything is fine but cant make it with CreateProcess(). Or maybe some1 can pm me how can i run Conquer directly ?
11/11/2010 03:26 © Haydz#2
Are you passing "blacknull" as the lpCommandLine Argument? Should work afaik.

I personally haven't tried to run conquer with CreateProcess.
I generally use ShellExecuteEx, so I can return the ProcessID for my DLL Injection.
11/11/2010 15:31 Ian*#3
you can actually just do like..


conquerPath = howeverYouDefineThis;
CreateProcess(conquerPath, "blacknull", ...);

erm.. just out of curiosity were you just trying to do CreateProcess(conquerPath + " blacknull"); ?
if so then yeah, that's your problem, i believe that returns file not found error.
11/11/2010 15:50 Trigorio#4
Or just define
Code:
Process MyProcess = Process.Start(Path + @"\Conquer.exe", "blacknull");
Could just directly run it ofcourse without defining any variable for it, but incase you want to use the Process later to for example inject a .dll into it it's good.

Before you do that though you have to make sure you set the current directory to the Path Directory else it wont run.
Example
Code:
Directory.SetCurrentDirectory(Path);
And after you have ran the process make sure to revert back the current directory to the initial.

An whole example would be
Code:
string InitialPath = Directory.GetCurrentDirectory();
Directory.SetCurrentDirectory(Path);
Process MyProcess = Process.Start(Path + @"\Conquer.exe", "blacknull");
Directory.SetCurrentDirectory(InitialPath);
11/11/2010 15:59 Ian*#5
Quote:
Originally Posted by Trigorio View Post
Or just define
Code:
Process MyProcess = Process.Start(Path + @"\Conquer.exe", "blacknull");
Could just directly run it ofcourse without defining any variable for it, but incase you want to use the Process later to for example inject a .dll into it it's good.

Before you do that though you have to make sure you set the current directory to the Path Directory else it wont run.
Example
Code:
Directory.SetCurrentDirectory(Path);
And after you have ran the process make sure to revert back the current directory to the initial.

An whole example would be
Code:
string InitialPath = Directory.GetCurrentDirectory();
Directory.SetCurrentDirectory(Path);
Process MyProcess = Process.Start(Path + @"\Conquer.exe", "blacknull");
Directory.SetCurrentDirectory(InitialPath);
I think he's using C++, or else he wouldn't want to use create process anyways :p
11/11/2010 19:40 IAmHawtness#6
Code:
CreateProcess(ConquerPath, " blacknull", 0, 0, False, 0, 0, WorkingDirectory, StartupInfo, ProcessInfo)
If you're creating the process like this, make sure that you set the "WorkingDirectory" parameter to your Conquer.exe's location and also make sure you add a space in the "blacknull" parameter (like shown in the above example)
11/11/2010 20:05 TomasLT#7
Quote:
Originally Posted by IAmHawtness View Post
Code:
CreateProcess(ConquerPath, " blacknull", 0, 0, False, 0, 0, WorkingDirectory, StartupInfo, ProcessInfo)
If you're creating the process like this, make sure that you set the "WorkingDirectory" parameter to your Conquer.exe's location and also make sure you add a space in the "blacknull" parameter (like shown in the above example)
Thx u bro. Yeah i just need WorkingDirectory parameter
11/11/2010 20:57 IAmHawtness#8
Quote:
Originally Posted by TomasLT View Post
Thx u bro. Yeah i just need WorkingDirectory parameter
Right, that should just be "C:\Program Files\Conquer 2.0" or whever you have Conquer installed. If you don't pass the right parameter, you'll get an error
11/12/2010 01:23 Trigorio#9
Quote:
Originally Posted by Ian* View Post
I think he's using C++, or else he wouldn't want to use create process anyways :p
Well that explains why I had no memory of a method called CreateProcess() in C# lol.