WshShell.Run Error 
Author Message
 WshShell.Run Error

We get the following error when running a shell command using the
WScript.ShellObject

Error Number: -2147024894
Error Description: {is blank, go figure?}

vReturn = wshShell.Run(sCommandString, 1, True)

where sCommandString contains something like

"vb5.exe /m c:\temp\project1.vbp /out c:\temp\project1.log"

We have set the path to vb5.exe up in the environment settings so it will
find it if in fact it can actually run the shell command. I have error
trapping turned on and check after each line runs, so I have tested to make
sure the Shell object is being created. The error is generated
right after the execute of the Run method.

Anyone have any thoughts? I've been through the KB, and have sent and
incident report to MSFT but maybe someone has already been there.

Thanks

Jason Phelps



Tue, 05 Feb 2002 03:00:00 GMT  
 WshShell.Run Error

-2147024894 converted to hex is 80070002.

the "7" in the "8007" indicates a Win32 error.  the rest is the error code (in hex of course).  in this case, a hex 2 is a decimal 2 any way you look at it ;-)

You can look up the (decimal) Win32 error codes on MSDN at http://msdn.microsoft.com/library/sdkdoc/winbase/errlist_9rqr.htm

where you'll find:

2 The system cannot find the file specified.  ERROR_FILE_NOT_FOUND

--
Michael Harris

| We get the following error when running a shell command using the
| WScript.ShellObject
|
| Error Number: -2147024894
| Error Description: {is blank, go figure?}
|
| vReturn = wshShell.Run(sCommandString, 1, True)
|
| where sCommandString contains something like
|
| "vb5.exe /m c:\temp\project1.vbp /out c:\temp\project1.log"
|
| We have set the path to vb5.exe up in the environment settings so it will
| find it if in fact it can actually run the shell command. I have error
| trapping turned on and check after each line runs, so I have tested to make
| sure the Shell object is being created. The error is generated
| right after the execute of the Run method.
|
| Anyone have any thoughts? I've been through the KB, and have sent and
| incident report to MSFT but maybe someone has already been there.
|
| Thanks
|
| Jason Phelps

|
|



Tue, 05 Feb 2002 03:00:00 GMT  
 WshShell.Run Error
Mike,

thanks a lot, we found an out of wack path variable that was throwing off
the shell command.

Jason

    -2147024894 converted to hex is 80070002.

    the "7" in the "8007" indicates a Win32 error.  the rest is the error
code (in hex of course).  in this case, a hex 2 is a decimal 2 any way you
look at it ;-)

    You can look up the (decimal) Win32 error codes on MSDN at
http://msdn.microsoft.com/library/sdkdoc/winbase/errlist_9rqr.htm

    where you'll find:

    2 The system cannot find the file specified.  ERROR_FILE_NOT_FOUND

    --
    Michael Harris



    | We get the following error when running a shell command using the
    | WScript.ShellObject
    |
    | Error Number: -2147024894
    | Error Description: {is blank, go figure?}
    |
    | vReturn = wshShell.Run(sCommandString, 1, True)
    |
    | where sCommandString contains something like
    |
    | "vb5.exe /m c:\temp\project1.vbp /out c:\temp\project1.log"
    |
    | We have set the path to vb5.exe up in the environment settings so it
will
    | find it if in fact it can actually run the shell command. I have error
    | trapping turned on and check after each line runs, so I have tested to
make
    | sure the Shell object is being created. The error is generated
    | right after the execute of the Run method.
    |
    | Anyone have any thoughts? I've been through the KB, and have sent and
    | incident report to MSFT but maybe someone has already been there.
    |
    | Thanks
    |
    | Jason Phelps

    |
    |



Tue, 05 Feb 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Returning WshShell.Run Error Levels

2. WshShell.Run error

3. using WshShell.Run - error returned

4. WshShell.Run vs WshShell.Exec

5. runas with WshShell.Exec versus WshShell.Run

6. Detecting errors after WshShell.Run

7. wshshell.run: I can't run when there is a space in the path

8. Running COMMAND.COM with WshShell.Run

9. WshShell.Run don't run WHY ???

10. Batch file won't run with WshShell.run

11. Redirect WshShell.Run Output ?

12. Proffesional Help Needed: Unwanted Security Prompt W/ WshShell.run from local html

 

 
Powered by phpBB® Forum Software