The following works just fine in process.start situation.
private string Path()
{
RegistryKey Key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wizet\\");
RegistryKey Location = Key.OpenSubKey("MapleStory");
return Location.GetValue("ExecPath").ToString();
}
public bool Launch()
{
maplestory = new ProcessStartInfo();
maplestory.FileName = Path() + @"\MapleStory.exe";
maplestory.Arguments = "WebStart";
MapleStory = Process.Start(maplestory);
}
Where would I now place the ‘.Arguments’ if I were to use CreateProcess and where would I place CREATE_SUSPENDED as well?
CreateProcess(AppName, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null, ref si, out pi);
In the second argument you can put command line options. And in the sixth you can put creation options like CREATE_SUSPENDED.
CreateProcess(AppName, "WebStart", IntPtr.Zero, IntPtr.Zero, false, CREATE_SUSPENDED, IntPtr.Zero, null, ref si, out pi);For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx