Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 8th, 2006, 05:29 AM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Executing files with parameters online

I want to run an executable file and a text file. Those files will use some parameters from the client, this executable is on the server.

In DOS it's easy
>file.exe text.txt "users input"
there comes an output on the screen. ^
But i want the output online

I have a code but I dont know how to change it for 2 files in stead of executing 1 file.

<%@ Page Language="vb" %>
<%@ Import Namespace="System.Diagnostics" %>
<%
      ''Get a file name relative to the current Web app.
      Dim file As String = Server.MapPath("file.exe")
      'Dim file2 As String = Server.MapPath("regels.style.txt")
      Dim info As ProcessStartInfo = new ProcessStartInfo(file, "blaat")
      ''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(p.StandardOutput.ReadToEnd( ), vbCrLf, "<BR />"))
%>

Who wants to help ?



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I pass parameters when creating files via CR linjader Classic ASP Databases 0 July 26th, 2006 03:48 AM
How I can pass parameters to 2 ASP files at ones? zukit Classic ASP Databases 4 December 15th, 2004 05:20 AM
calling and executing files lucid Oracle 2 April 5th, 2004 02:09 AM
Passing parameters between 2 asp files spraveens Classic ASP Databases 3 September 23rd, 2003 02:49 PM
Passing Parameters between 2 asp files spraveens Classic ASP Basics 1 September 17th, 2003 10:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.