Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

call a command line .exe with parameters from ASP

Status
Not open for further replies.

sfunk

Technical User
Jan 22, 2002
107
US
Hello,

How do I call a command line .exe with parameters that is residing on the server-side from an ASP page?

I own the server so I have full access.
I know about NTFS and IIS permissions and don't need an explanation of how to configure these.
The parameters are being provided by fill in boxes and dropdown boxes.

Thank you,
Steve
 
Great, i have what I need working now.

my next issue is when i take the output and use Response.Write it comes back in a giant block of text as if it's ignoring a carrige return. the output that normally shows up in the command window prints like.

Item1 blah blah blah
Item2 blah blah blah
Item3 blah blah blah
Item4 blah blah blah
Item5 blah blah blah
Item6 blah blah blah
...

when the Response.Write prints it in the asp page it comes out like.

Item1 blah blah blah Item2 blah blah blah Item3 blah blah blah Item4 blah blah blah Item5 blah blah blah Item6 blah blah blah

What is the easiest way to have it write on the asp page as the first example.

At first, I thought that writing it to a temp <%=Session.SessionID%>.txt file and reading it back it with the filestream and deleting the file when the session ends but that is I hope the long way around. I am crossing my fingers that there is an easier way.

Sincerely,
Steve
 
sfunk,

When displaying to a web page a &quot;<br>&quot; needs to replace the line feed carriage return.

fengshui_1998
 
I understand what you are explaining. The issue is this is data that is being returned from an .exe and I don't have a way of adding the <br> to the linefeed.

Thank you,
Steve
 
You could run the return string through a replace function :

rtnString = replace (rtnString, Vbcrlf, &quot;<br />&quot;) Regards

David Byng

spider.gif


davidbyng@hotmail.com
 
sfunk,

The only way I know of doing what you need to do is to
1. Capture the output to a file,
2. Open that file and doing a replace for the carrriage return line feed
3. Write the replacement string to the web browser using response.write


fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top