Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Running a Perl Script in ASP.NET

Thread Tools

Running a Perl Script in ASP.NET

Posts: n/a

i want to create an active webpage that displays the
status of users quotas on a volume of a server.
I installed IIS on this server and installed Win2k server
Resource Kit because the Perl script ""
exactly doing what i want.
I created a function (see below) that running the script
in a dos-command mode... BUT nothing happens (
please help me

My function is :

Private sub page_load(....)
'First time, i tried this
Label2.Text = ExecuteApp("c:\perl\bin\perl.exe_
c:\perl\ -query -format csv e:_

'Second time..... i put the entire command line in a bat
Label2.Text = ExecuteApp("C:\quotas.bat")
end sub

Public Function ExecuteApp(ByVal cmd As String) As String
Dim output As String
Dim errors As String
'create a tempfilecollection for output and error messages
Dim tf As New System.CodeDom.Compiler.TempFileCollection
'execute the command
System.CodeDom.Compiler.Executor.ExecWaitWithCaptu re(cmd,
tf, output, errors)
'read the file with the output of the command and return
its content
Dim sr As System.IO.StreamReader = System.IO.File.OpenText
ExecuteApp = sr.ReadToEnd
'Delete the temporary files
End Function

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble running Perl script from within a Perl script Perl Misc 4 07-29-2011 01:44 PM
How to fetch output of some other script in the current running perl script? Perl Misc 4 10-27-2007 03:52 PM
problem calling perl script from SOAP server perl script pj Perl Misc 3 04-09-2004 10:23 PM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM
How to make Perl Script "POST" call from another Perl Script??? Wet Basement Perl 1 07-15-2003 10:25 PM