calling an external application
How do i call an external application? I've tried using the codes shown below but it doesn't work. Pls help
' Get a file name relative to the current Web app.
Dim file As String = Server.MapPath("~/Monitor.exe")
If Not System.IO.File.Exists(file) Then
Response.Write("Could not find file: " & file)
Response.End()
End If
Dim info As New ProcessStartInfo(file)
'ProcessStartInfo(file)
info.FileName = file
' Redirect output so we can read it.
info.RedirectStandardOutput = True
'To redirect, we must not use shell execute.
info.UseShellExecute = False
' Create and execute the process.
Dim p As Process = Process.Start(file)
p.Start()
|