Getting results from WshShell.Run 
Author Message
 Getting results from WshShell.Run

I am running an external app as such:

set Line0 = Wscript.CreateObject("Wscript.Shell")
Line0.Run("f:\download\mrtg\usr\bin\snmpget" & " " & target & " " & comm & "
" & OID, 1, TRUE)

target and comm being command line variables.

'snmpget target comm OID' returns a value.

How do I get access to this value?? I can't find anything in the
documentation about it.

Thanks,
Scott



Sat, 10 Feb 2001 03:00:00 GMT  
 Getting results from WshShell.Run
You can get the error level back by doing
retValue=Line0.Run("f:\download\mrtg\usr\bin\snmpget" & " " & target & " " &
comm & "
" & OID, 1, TRUE)
Line0.popup retValue
Regards,
Ian Morrish
http://wsh.glazier.co.nz WSHFAQ
http://ils.glazier.co.nz (NetMeeting)
http://www.glazier.co.nz
Quote:

>I am running an external app as such:

>set Line0 = Wscript.CreateObject("Wscript.Shell")
>Line0.Run("f:\download\mrtg\usr\bin\snmpget" & " " & target & " " & comm &
"
>" & OID, 1, TRUE)

>target and comm being command line variables.

>'snmpget target comm OID' returns a value.

>How do I get access to this value?? I can't find anything in the
>documentation about it.

>Thanks,
>Scott



Sun, 11 Feb 2001 03:00:00 GMT  
 Getting results from WshShell.Run
This is incorrect. It only returns the Return Code of the command.
Not the actual SNMP message that is returned. The only way
to do this is to redirect it to a file

Quote:

>You can get the error level back by doing
>retValue=Line0.Run("f:\download\mrtg\usr\bin\snmpget" & " " & target & " "
&
>comm & "
>" & OID, 1, TRUE)
>Line0.popup retValue
>Regards,
>Ian Morrish
>http://wsh.glazier.co.nz WSHFAQ
>http://ils.glazier.co.nz (NetMeeting)
>http://www.glazier.co.nz

>>I am running an external app as such:

>>set Line0 = Wscript.CreateObject("Wscript.Shell")
>>Line0.Run("f:\download\mrtg\usr\bin\snmpget" & " " & target & " " & comm &
>"
>>" & OID, 1, TRUE)

>>target and comm being command line variables.

>>'snmpget target comm OID' returns a value.

>>How do I get access to this value?? I can't find anything in the
>>documentation about it.

>>Thanks,
>>Scott



Tue, 20 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. WshShell.Run vs WshShell.Exec

2. runas with WshShell.Exec versus WshShell.Run

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

4. Running COMMAND.COM with WshShell.Run

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

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

7. getting results with InputBox

8. Getting a URL Call result into a string?

9. Problem Executing WSH script and getting a result with ASPExec

10. getting results with InputBox

11. Redirect WshShell.Run Output ?

12. Returning WshShell.Run Error Levels

 

 
Powered by phpBB® Forum Software