Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i run other programs with vbs ?

Status
Not open for further replies.

cpu90

Programmer
Joined
Aug 8, 2003
Messages
2
Location
US
hi guys, i'm trying to run this program called RRDtool, its a database software..anyway so i have this text file containing values, i'm using vbscript to extract the values from the file, and then putting those extracted values onto the command line to run RRDtool with the values...but i dont know how to put the values onto the command line and run RRDtool..do i HAVE to create a batch file for running other programms on the command line? if vbscript is doable, please let me know how ! thanks ( on the command line it'll look like c:\>rrdtool create test.rrd value1 value2 value3 )
 
Try something like this:
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
cmd="c:\>rrdtool create test.rrd"
cmd=cmd & " " & value1
cmd=cmd & " " & value2
cmd=cmd & " " & value3
WshShell.Run cmd
The syntax:
object.Run strCommand, intWindowStyle, bWaitOnReturn

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top