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!

Sending command to cmd.exe from VB

Status
Not open for further replies.

mrgulic

Technical User
Joined
Sep 18, 2001
Messages
248
Location
US
I have 97 batch files (.bat) that we run manually.

I put the batch data into a table and with the help of a Form Timer and some code, I have it cycle through the recordset until all have been run while keeping an "X" number of them (the cmd.exe's executeing the batch line) running all the time.

here is what the table contains

[Green]"c:\Program Files\GFI\LANguard Network Security Scanner 3\languard.exe" dew_snmp_icmp.ini 010.006.001.001-010.006.001.254 "c:\scan\Reports Prod\w010.006.001.001.html" tray[/Green]

i use the following to open the command prompt and send the records contents to it.

[Green]Shell "cmd /c " & rs.Fields("id")[/Green]

It works great when the table contains IP address and i use PING to test it.

[Green]Shell "cmd /c ping " & rs.Fields("id")[/green]

Please help.
 
most propably because it has multiple commands try it only with one command at a time!

nick
 
It depends on the operatng system but!
 
Can't do one at a time. Those are parameters. Its all or nothing unfortunately.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top