0

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
  • 3
    Can you be a little more specific here? It sounds like you are trying to execute external commands from within your program, is that true? Commented Nov 14, 2009 at 19:48
  • Could you elaborate a little more. I want to have my program execute a bunch of commands is quite confusing. The title and the tags are not helping either. Commented Nov 14, 2009 at 19:50

1 Answer 1

2

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);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.