vbscript WshShell.exec call in ASP
From: sticky (sticky_at_hotmail.com)
Date: 04/05/04
- Next message: A.Strasser: "Re: Value for "Application Data""
- Previous message: Support: "Re: WMI:"
- Next in thread: sticky: "Re: vbscript WshShell.exec call in ASP"
- Reply: sticky: "Re: vbscript WshShell.exec call in ASP"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 6 Apr 2004 08:25:38 +1200
Hi,
I'm trying to get an WshShell.exec call working from within as ASP page I am
developing. I have upgraded the WSH on the server to version 5.6 and am no
longer getting the 'object doesn't support this property or method' errors.
Instead, I'm getting the error:
WshShell.Exec error '80070002'
The system cannot find the file specified.
/gartner_dev/Default.asp, line 14
My code is very simple - I'm just trying to get a simple exec call working
for a start:
Option Explicit
Dim objExec, objWshShell
Set objWshShell = Server.CreateObject("Wscript.Shell")
objWshShell.exec("dir")
But even this simple code returns the error above! No matter what command I
try to exec, I get the error. Is there some component I'm missing? What file
is it looking for? I can't use the run method as I need the stdOut of the
command... although I guess I could output that to a text file, but I'd
really rather not have the overhead.
Any ideas?
- Next message: A.Strasser: "Re: Value for "Application Data""
- Previous message: Support: "Re: WMI:"
- Next in thread: sticky: "Re: vbscript WshShell.exec call in ASP"
- Reply: sticky: "Re: vbscript WshShell.exec call in ASP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|