Executing an External Batch File from A ASP Page

Results 1 to 2 of 2

Thread: Executing an External Batch File from A ASP Page

  1. #1
    Robin Brandl Guest

    Default Executing an External Batch File from A ASP Page

    Can anyone tell me how to execute a batch file on a server and getting the results back? I would really like to pass some command line variables to it also. Any help would be greatly appreciated.<BR>Robin

  2. #2
    Ian Stallings Guest

    Default RE: Executing an External Batch File from A ASP Page

    You can use the Windows Scripting Host<BR>to execute command line functions and get<BR>a return.<BR><BR>Use for the WSH:<BR><BR>strACLCommand = "whatever.bat"<BR>Set objWSH = Server.CreateObject("WScript.Shell")<BR>objRTC = objWSH.Run (strACLCommand , 0, True)<BR><BR>Set objWSH = Nothing<BR><BR>Of course you must install the WSH<BR>you can download it from http://msdn.microsoft.com/scripting<BR><BR>Another option would be the ASPexec object<BR>whcih you can find on the Inernet to download<BR>(although documentation is limited)<BR><BR>Hope this helps.<BR><BR>

Posting Permissions

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