AspExec - Run batch file from ASP page

Discussion in 'ASP General' started by Uday, May 12, 2006.

  1. Uday

    Uday Guest

    hi everyone,
    I searched in faq's but couldn't find and solution...
    so here I post the popular question..

    Env: Win2003 server / IIS6.0
    Simple ASP page that runs a batch file.

    When I run the asp page, I see some command line window pop-up on my screen
    for a second [may be the "cmd" is triggered without any parameters]. But the
    batch file is not executed. I gave 'IUSR_*' account 'full control'.
    -----------------------CODE----------------------------
    Set objExecutor = Server.CreateObject("ASPExec.Execute")
    objExecutor.Application = "cmd.exe"
    objExecutor.Parameters = "/c c:\test.bat"
    objExecutor.ShowWindow = True
    strResult = objExecutor.ExecuteWinApp
    response.write "<p>" & strResult & "</p>"
    -----------------------CODE----------------------------
    On running the ASP page I see output as "Ok", with no errors. But the batch
    file is not executed.

    Interestingly, when I tried "WScript.Shell", same exact thing happennd
    [command pop-up for a second, with no executing of batch file.]

    I have this exact setup running on a Win2000/IIS 5 running for over a
    year.....

    Any suggestions are appreciated...
    thanks,
     
    Uday, May 12, 2006
    #1
    1. Advertising

  2. Uday

    Ben Guest

    It seams, many people have this problem with IIS6 / Windows 2003 - but nobody has a solution?
     
    Ben, May 31, 2006
    #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. Replies:
    2
    Views:
    1,078
    Ken Cox - Microsoft MVP
    Feb 3, 2006
  2. Dave Karmens

    wsh VS aspexec

    Dave Karmens, Feb 19, 2004, in forum: ASP General
    Replies:
    0
    Views:
    104
    Dave Karmens
    Feb 19, 2004
  3. northof40
    Replies:
    0
    Views:
    157
    northof40
    May 11, 2007
  4. Replies:
    0
    Views:
    378
  5. c676228

    aspexec is not working in IIS 6.0

    c676228, Nov 8, 2007, in forum: ASP General
    Replies:
    10
    Views:
    595
    Steven Cheng[MSFT]
    Nov 12, 2007
Loading...

Share This Page