ExecuteWinApp not able to run the command

K

kk.simhadri

Hi all

I want to run a bat file in the server through an ASP page.
The following is the code in my ASP page.

<html>
<body>
<html>
<body>
<form runat="server">
<%

Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd.exe"
Executor.Parameters = "/c C:\Inetpub\wwwroot\RunBatchfile.exe"
Executor.ShowWindow = True
Response.Write "Attempting to execute " & Executor.Application &
"<br>"
strResult = Executor.ExecuteWinApp
Response.Write "The result of this call was: " & strResult


%>
</form>
</body>
</html>

output:

Attempting to execute cmd.exe
The result of this call was: cmd.exe /c
C:\Inetpub\wwwroot\RunBatchfile.exe

But when I put the result in run and execute it works fine.

I think that ExecuteWinApp is not able to run the command.

I am running this on windows server 2003.

does anybody have an idea on this ?

Any help would be appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top