Hi,
since the download vs. execute bat file in Apache2 on win2k seems to have
been solved (by using html formatting), I have another question. How can I
call an exe in a batch file and have the results display in the browser.
For example, I have executed this tool:
http://www.sysinternals.com/ntw2k/freeware/psinfo.shtml inside my cgi-bin
directory like so:
http://puter.com/cgi-bin/psinfo.exe? and I get these
results:
PsInfo 1.34 - local and remote system information viewer
Copyright (C) 2001-2002 Mark Russinovich
Sysinternals -
www.sysinternals.com
Querying information for WORKHORSE...
System information for \\WORKHORSE:
Uptime: Error reading uptime
Kernel version: Microsoft Windows 2000, Uniprocessor Free
Product type: Professional
Product version: 5.0
Service pack: 4
Kernel build number: 2195
Registered organization: none
Registered owner: workhorse
Install date: 6/11/2003, 7:28:39 PM
IE version: 6.0000
System root: C:\WINNT
Processors: 1
Processor speed: 120 MHz
Processor type: Intel Pentium
Physical memory: 80 MB
Which is exactly how it should be.
But I'd like to know how I can call that inside a bat file, but it doesn't
work. When I have the batch file like so:
@echo off
echo Content-Type: text/html
echo.
Echo ^<HTML^>
Echo ^<HEAD^>
Echo ^<TITLE^>TEST BAT FILE^</title^>
Echo ^</head^>
Echo ^<BODY^>
Psinfo.exe
Echo ^</body^>
Echo ^</html^>
When I call it, it doesn't show any results, and in fact the browser doesn't
display anything, and my error log shows no errors. How can I get it to
execute and display the results?
Thanks!
Rach