Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Cannot run bat from within ASP using WSript.Shell.

Reply
Thread Tools

Cannot run bat from within ASP using WSript.Shell.

 
 
Bedny
Guest
Posts: n/a
 
      09-03-2009
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, http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run a bat file in remote PC through ASP kk.simhadri@gmail.com ASP General 2 10-10-2006 11:27 AM
Run a .Bat file on the client machine =?Utf-8?B?c29ubnk=?= ASP .Net 10 01-26-2005 04:11 PM
Run a bat form an aspx page =?Utf-8?B?Q2FybWVuIGRlIExhcmE=?= ASP .Net 2 01-04-2005 01:23 AM
bad data from urllib when run from MS .bat file Stuart McGraw Python 8 09-22-2004 11:03 PM
Run BAT file with ASP script [ERROR] Josh ASP General 1 10-23-2003 04:37 PM



Advertisments