Execute Command Line Script from ASP Page

M

Matt

I used to execute a command line script in IIS 4 using Dynuexec. This
is a third part server object I installed on the server
(http://www.dynu.com/dynuexec.asp). I installed this object onto my
Windows 2003 Server and I cannot run the script from an ASP. No error
is generated on the screen or in the event log. I think this has
something to do with IIS not being able to access cmd.exe from IIS or
maybe with COM permissions? Not sure though. I also tried using
WScript.Shell to execute the command line script and still could not
execute it from the ASP page. If I run the command line script from the
command prompt on the server it executes fine. How can I execute a
command line script form an ASP on Windows Server 2003 and IIS 6?
 
R

Ray Costanzo [MVP]

Permissions is the most likely cause. If you open a command prompt on your
2003 machine and enter "cacls %comspec%" you'll get something like:

C:\WINDOWS\system32\cmd.exe NT AUTHORITY\INTERACTIVE:R
NT AUTHORITY\SERVICE:R
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
BUILTIN\Administrators:F
RAY2003\TelnetClients:R

Notice that the IUSR account does not have rights, nor does the guest group.

Enter this: cacls %comspec% /E /G IUSR_your_server_name:R

And you should be okay.

Ray at home
 

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,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top