promotion image of download ymail app
Promoted

How can I launch an external program in VIsual C# in a button click event?

eg: When the user presses a button c:\myapp\myapp.exe is launched.

Thanks

Update:

Thanks, RobX, that solution worked perfectly.

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    You use System.Diagnostics.Process

    http://msdn.microsoft.com/en-us/library/system.dia...

    This is how I do it in one of my programs...

    Process p = new Process();

    p.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);

    p.StartInfo.FileName = path;

    p.Start();

    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.