473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Running a Perl Script in ASP.NET

Hello,

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 "DiskQuotas.pl"
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 asp.net function is :

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

'Second time..... i put the entire command line in a bat
file
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
(output)
ExecuteApp = sr.ReadToEnd
sr.Close()
'Delete the temporary files
System.IO.File.Delete(output)
System.IO.File.Delete(errors)
End Function

Nov 17 '05 #1
0 3678

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Fabio | last post by:
Hello, there's something I'd like to understand... I want to connect to the MS SQL Server database, get some records, store them into the text file, send the file through VPN connection and...
6
by: Pierre-Yves | last post by:
Hello, I would like to prevent my perl program to be executed several times simultaneously (if the program is already running, I would like to display a message like "another instance of this...
5
by: Hal Vaughan | last post by:
Is there a way to run a Perl script WITHOUT submitting a form? I want to be able to click an "update" button on a page and have it run a Perl script to update info, without changing the document...
10
by: shumaker | last post by:
I don't need a detailed description of a solution(although I wouldn't mind), but I am hoping someone could tell me in general the best path to go about accomplishing a task, since I don't know all...
3
by: sir.linying | last post by:
My php script is to call perl scipt which makes use of Spreadsheet::ParseExcel module to parse Excel file. I am able to launch php script from command line so that perl script can run and properly...
4
by: benwylie | last post by:
I am running IIS 6.0 on Windows 2003. I would like to be able to run a perl script from a web page and include the output. I have tried doing it with an ssi: <form action='docsearch.shtml'...
2
by: carllucas | last post by:
I have no exprience with perl. What I'm trying to do is have a script/program constantly (perpetually) running on my server so that it performs a routine (like every hour) and automatic check of...
1
by: Tension | last post by:
Hi. I have a Perl script that starts a build process (plus a lot of other things). The build process needs a few environment variables set. This is done automatically in a buildEnv.bat script...
6
by: aravindtn | last post by:
i have a netwok,and i have a perl script running on a machine(say machine1). the purpose of the script is to login to each of the other machines using ssh. i am able to logon to other machne (say...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.