By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Execute Command Line Script from ASP Page

P: n/a
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?

Sep 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
"Matt" <ma***********@manning-napier.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
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?

Sep 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.