Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Two important things i need to ask.

 

1. What piece of code will be required to launch an application from our asp.net code. The application is a .NEt application written in c# installed in the system(in program files). So what code will be required to launch that application.

 

2. When i will launch the application from my asp.net code, at that time i want to pass a string argument to my application. So how will i pass arguemnt while launching the application.

 

Hayee

  • *Experts*
Posted

To start an application you System.Diagnostics.Process class. Like this:

System.Diagnostics.Process.Start("Path to executable")

To get some other options for starting the process use the ProcessStartInfo class:

Dim pinfo As New System.Diagnostics.ProcessStartInfo
pinfo.Arguments = "arguments go here"
pinfo.FileName = "path to executable"
System.Diagnostics.Process.Start(pinfo) 
'start using the info provided in the pinfo object

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...