
- WSHSHELL.EXEC error in ASP Web Page
A VBS isn't a Win32 application.
Your VBS file must be passed as parameter to wscript.exe
Try this code:
Dim wss : wss = Server.CreateObject("WScript.Shell")
wss.Run "wscript.exe " & myVBS.vbs
Note: wscript.exe is located in System32 folder.
Quote:
>-----Original Message-----
> Dim oWShell, oExec, CmdStr, StrEXEResult, oFPath
> oFPath = "C:\Inetpub\WWWRoot\PACER\"
> Set oWShell = CreateObject("WScript.Shell")
> Set oExec = oWShell.Exec(oFPath&"GoWeb.bat ")
> StrEXEResult = oExec.StdOut.Readall()
> WScript.Echo oExec.Status
>When I try to run this script from an ASP page, I have
gotten:
> 1) Access Denied when running a batch file to run the
VBS WSH Script.
> 2) Not a valid Win NT application when trying to run
the VBS script directly.
Quote:
> 3) It just hangs if I try to run an executable.
> Input and ideas please.
>.