Login or Sign Up to become a member!

EXPERTS, INFORMATION, IDEAS & KNOWLEDGE

Social bookmarker Add this

ASP.NET: Launch an external application

From Wiki

Jump to: navigation, search

Summary: An example of how to launch another application on the server

Prior to the release of the .NET framework, developers using older programming languages (such as VB6) often used commands such as Shell or ShellExecute to launch an external program. The .NET framework brings us it's own version and allows us much more control. This version uses the System.Diagnostics.Process class and an example of how to use it is:

  1. Dim MyProcess As New System.Diagnostics.Process  
  2.    MyProcess.StartInfo.CreateNoWindow = True  
  3.    MyProcess.StartInfo.UseShellExecute = True  
  4.    MyProcess.StartInfo.WorkingDirectory = "C:\MyDirectory"  
  5.    MyProcess.StartInfo.FileName = "MyApplication.exe"  
  6.    MyProcess.StartInfo.Arguments = "MyArgument"  
  7.    MyProcess.Start()

NOTE: This will launch the application on the server, not the client's machine.


This Hack is part of the ASP.NET Hacks collection

429 Rating: 2.0/5 (2 votes cast)