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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I run a batch file in asp.net

Status
Not open for further replies.

sibasis

Technical User
Mar 1, 2002
94
VB and ASP.NET
Can I execute a batch program on the click of a button on an aspx page

ths in adv.
 
If I recall correctly, I believe that you could run a batch file on the server but not on the client.

Hopefully someone has more information soon.

Hope everyone is having a great day!

Thanks - Jennifer
 
thanks jennifer,

could you also recall how you could run it on the server
object/method / property anything would help

thx
-Sibasis
 
I havent been on tek-tips for a month now anyways
lemme close all my open requests

The solution to running an exe in a asp.net page on the server is running it within the name space system.diagnostics and class "processstartinfo"

Dim proc As New System.Diagnostics.ProcessStartInfo("c:\authorizedareaforaspnetuser\test.cmd")
proc.RedirectStandardOutput = True
proc.WindowStyle = proc.WindowStyle.Hidden
proc.UseShellExecute = False
Dim SendFile As System.Diagnostics.Process
SendFile = System.Diagnostics.Process.Start(proc)
SendFile.WaitForExit(3000)

Hope it helps :eek:)

Sibasis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top