Hi, I need some help executing a program from an asp page.
I've tried using aspexec and wsh, here is the code for both:
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "C:\program name"
Executor.Parameters = "c:\autoexec.bat"
Executor.TimeOut = 9000 ' may take out
Executor.ShowWindow = True
Response.Write "Attempting to execute " & Executor.Application & "<br>"
strResult = Executor.ExecuteWinApp
Response.Write "The result of this call was: " & strResult
Set oWSH= CreateObject("WScript.Shell")
oWSH.Run "C:\program name", 1, True
set oWSH = nothing
Each program I try to execute, whether it be 'notepad' or an executable, just ends up hanging in task manager on the server.
This code is actually to be run for a self-terminating program, and it should kick itself out of task manager once it is completed. It does not, however, and has '00' for CPU usage at all times.
Any response is greatly appreciated! Thanks!