473,385 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Execute Command Line Script from ASP Page

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
1 8817
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bob Garbados | last post by:
I'm pretty new to php\linux and I'm trying to encrypt a file using gpg from a php page on a linux box and it's not working. The following code works for executing 'ls', but not gpg... ...
14
by: Larry Woods | last post by:
I need to execute a Windows script (wscript/cscript) from an ASP page for some administrative functions. Anyone doing this? If so, how? TIA, Larry Woods
4
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
6
by: Brian Miller | last post by:
I've been constructing an ASP.Net application using the 1.1 framework, and have been using Web Matrix for development purposes. Now that my application is near completion, I wanted to see if I can...
1
by: Crash | last post by:
Hi, ..NET v1.x SP1 VS 2003 SQL Server 2000 SP3 Server 2000, XP, Server 2003 I would like to programmatically execute {possibly many} SQL Server batch scripts. Aka I have many scripts that...
4
by: Chr1s | last post by:
How do I execute a crontab command using php (not CLI) as user Joe? I don't have any problem getting output from commands such as 'ls' using passthru and exec but I am stumped with crontab. ...
23
by: ticfranca | last post by:
Hi, I'm getting this error in the code below: sub Pega_recorde { $database = 'bundinha'; $host = 'localhost'; $usuario = 'myhumoradm'; $senha = 'my8xr2d2'; ...
0
by: AirYT | last post by:
Done a bunch of searching on this topic and i have come up with nothing. I have a .vbs script that i wish to execute by calling an asp page. i am working on a W2K server with IIS5.0 & SP4. ...
51
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.