Execute Command Line Script from ASP Page

Discussion in 'ASP General' started by Matt, Sep 12, 2005.

  1. Matt

    Matt Guest

    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?
    Matt, Sep 12, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >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?
    >
    Ray Costanzo [MVP], Sep 13, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas Cowald
    Replies:
    4
    Views:
    1,055
    Tohid
    Oct 23, 2003
  2. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    233
    Genich
    Oct 22, 2003
  3. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page.

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    200
    Oliver
    Oct 22, 2003
  4. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page.

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    174
    Lucas Cowald
    Oct 22, 2003
  5. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page.

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    233
    Lucas Cowald
    Oct 22, 2003
Loading...

Share This Page