Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

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: 3.0/5 (9 votes cast)