Opening Other Application

  • Thread starter Thread starter sravan_reddy001
  • Start date Start date
S

sravan_reddy001

Is it possible to run other applications like start MS word, or turn
off the system, or run an antivirus program SCAN etc.. using .NET
 
sravan_reddy001 said:
Is it possible to run other applications like start MS word, or turn
off the system, or run an antivirus program SCAN etc.. using .NET

Yes ...

Process.Start is one possibility.

Arne
 
Yes you can with diagnostic.Process.start(..). you can also pass
parameteres to the process you want start.
For example:

// Starting a new process.
using System;
using System.Diagnostics;

public class StartProcess
{
public static void Main()
{
Process newProc = Process.Start("wordpad.exe");
Console.WriteLine("New process started.");
newProc.WaitForExit();
newProc.Close(); // free resources
Console.WriteLine("New process ended.");
}
}

Take a look at this. It will help you

http://www.codeproject.com/csharp/start_an_external_app.asp
 
thanks..

that worked good...
now how can i take control over the presently running process. ex
explorer.exe

i want my program to end explorer.exe and start it after some 15 secs..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top