Cannot run bat from within ASP using WSript.Shell.

B

Bedny

Hello gurus,

I have the following code in my the very simple ASP script:

<%@ LANGUAGE="JScript" CODEPAGE="1250" %>
<%
try
{
var objShell = new ActiveXObject("WSCript.Shell");
objShell.Exec("d:/somebatchfile.bat");
objShell = null;
Response.Write("OK");
}
catch(e)
{
Response.Write("Error");
}
%>

What I want it to do is to run the "bat" batch file specified. I
allways got a message Access denied, whitch propably means that the
user running the ASP, IUSR_..., has no right needed to run the bat.

Is it right or is there something else what i need to check before
running bat from within ASP?

I already changed the owner of a bat to IUSR_, but it did not help.

Thank you very very much for any help.

Tomas, (e-mail address removed)
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top