How To Execute applications?

        In VC++ WinExec() is used to execute any Windows/DOS based application.  Is there any similar class or method in C# . if so please tell me how it can be used in an application


Regards
Shaji Kumar.V.K


Answer this question

How To Execute applications?

  • ase3575

    Hi,

    You do as follows:
    You can use the Arguments property to pass the arguments to the app.

    using System.Diagnostics;

    Process newProcess =
    new Process();
    newProcess.StartInfo.FileName = "notepad.exe";
    newProcess.StartInfo.Arguments = @"c:\test.txt";
    newProcess.Start();

    Regards,
    Vikram



  • even

    Hi,

    You can use the Start method of Process class to execute an application in C#:

    System.Diagnostics.Process.Start("notepad.exe");



    Regards,

    -chris




  • How To Execute applications?