Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


launch .BAT files from ASP

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,3013
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> launch .BAT files from ASP
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 launch .BAT files from ASP - 5/16/2005 5:15:48 AM   
  willem

 

Posts: 12
Score: 0
Joined: 4/25/2005
From: France
Status: offline
Hi there scripters,

I am trying to run a batch file from an ASP page.
[^]from a .vbs script, the following code gives returncode 0:

oShell=wscript.createobject("wscript.shell")
rc=oShell.run("test.bat",1,true)
wscript.echo rc

from my ASP page, I am doing the following:

oShell=createobject("wscript.shell")
rc=oShell.run("test.bat",1,true)
response.write "rc=" & cstr(rc)

[:(!]this does not execute the batch file, and returns rc=1.
The batch file (for the moment) just copies a file to another.

What am I doing wrong ?
I tried:
rc=oShell.run("cmd /c test.bat",1,true)
it doesn't work either.

thanks for your help in advance!
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> launch .BAT files from ASP Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts