Results 1 to 3 of 3

Thread: Executing .bat file from ASP

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    3

    Unhappy Executing .bat file from ASP

    Hello

    I have been attempting to execute a .bat file from ASP using the following code:

    Code:
    Dim objShell, rCode
    Set objShell = Server.CreateObject("WScript.Shell")
    
    rCode = objShell.Run("d:\Lisa\ITG\test.bat", 1, True)
    Set objShell=nothing
    The batch file has a simple command line execution of an application in it, which works.

    Every website I have referred to has similar code to that above. However, when I run the code, (which occurs after filling in an online form and the data is captured), I get a "page cannot be displayed" error (without the code above, the resulting page appears fine).

    I have come to the conclusion that it must be something to do with my server settings. I am running IIS (Windows 2000). I have set the permissions to allow scripts and executables.

    Does anyone have any ideas on how I can get this working? Thanks.
    Last edited by goosel; Jul 17th, 2005 at 11:20 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width