Here is a VB.NET version of a C# example that I found to do just that. It’s really simple to do.
<%@ Page Language="vb" %> <%@ Import Namespace="System.Diagnostics" %> <% ''Get a file name relative to the current Web app. Dim file As String = Server.MapPath("Program.exe") Dim info As ProcessStartInfo = new ProcessStartInfo(file, "/arguments") ''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(info) p.Start() ''Send whatever was returned through the output to the client. Response.Write(Replace(Replace(p.StandardOutput.ReadToEnd(), vbCrLf, " "), " ", " ")) %>
This site is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. We also participates in affiliate programs with Udemy, and other sites. This site is compensated for referring traffic and business to these companies.