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("c:\test\test.bat",1,true)
wscript.echo rc
from my ASP page, I am doing the following:
oShell=createobject("wscript.shell")
rc=oShell.run("c:\test\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 name.
(copy c:\test\test1.txt c:\test\test2.txt) just to check if it works.
What am I doing wrong ?
I tried:
rc=oShell.run("cmd /c c:\test\test.bat",1,true)
it doesn't work either.
thanks for your help in advance!
I posted the same topic in the ASP forum, but there are not a lot of people around...