views:

329

answers:

1

I want to have my program execute a bunch of commands on load-time and this is in C# btw, but it's a console program, how can I do that?

+2  A: 

If you are trying to execute external applications from within your C# console application, see the ProcessStartInfo and Process class.

Example:

Process.Start("IExplore.exe", "www.google.com");

// -- OR --
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
startInfo.Arguments = "www.google.com";
Process.Start(startInfo);
jheddings