|
-
Jul 19th, 2000, 10:24 AM
#1
Thread Starter
Fanatic Member
OK I'm almost there
open "c:\temp.bat" for output as #1
print #1, "ping http://www.espn.com > c:\temp.txt"
close #1
shell "c:\temp.bat"
' wait for it to get done some how.
open "c:\temp.txt" for input as #1
b()=input lof(1),1
close #1
ITS Works
But what if I want to run a command like
NSLOOKUP
'then send
set type = mx
'then
yahoo.com
???
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Jul 19th, 2000, 10:54 AM
#2
Addicted Member
Scooby Says: ARRRUUUUUUUUUUU!!!!!!????????
Hmmmmmmpfff
Try it like this....
Dim message as string
message = "NSLOOKUP set type = mx yahoo.com"
Open "c:\temp.bat" for output as #1
print #1, message
close #1
That's how i use long commands in a .bat file
Hope it helps..
see ya
-
Jul 19th, 2000, 11:07 AM
#3
Thread Starter
Fanatic Member
Didn't work
any other ideas?
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Jul 19th, 2000, 01:20 PM
#4
Lively Member
AFTER MUCH THOUGHT
Here it is
Make a file, I called it test.bat
put in test.bat:
set type=mx
yahoo.com
run:
nslookup <test.bat
will put output on screen
nslookup <testbat >test.txt
will put into file
try that
VB 6 Professional Edition
-
Jul 20th, 2000, 08:43 AM
#5
Thread Starter
Fanatic Member
I can't get it to work.
I just want to see it work with this code
minus the output
Open "c:\temp.bat" For Output As #1
Print #1, "yahoo.com"
Close #1
Open "c:\temp1.bat" For Output As 1
Print #1, "nslookup >c:\temp.bat"
Close #1
Shell "c:\temp1.bat", vbMaximizedFocus
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Jul 20th, 2000, 10:10 AM
#6
Thread Starter
Fanatic Member
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Jul 20th, 2000, 10:13 AM
#7
Lively Member
Open "c:\temp.bat" For Output As #1
Print #1, "yahoo.com"
Close #1
Open "c:\temp1.bat" For Output As 1
Print #1, "nslookup >c:\temp.bat"
Close #1
Shell "c:\temp1.bat", vbMaximizedFocus
All the above code does is place "yahoo.com" in temp.bat
turn the arrow around in temp1.bat file. you are not passing nslookup anything to evalute you are only telling it to send output to the file temp.bat. but there is no output
i am leaving today at noon EST. I can check my email for the next few days, so if you need more help with this after noon, send it to email.
[email protected]
will look a few more times before noon
VB 6 Professional Edition
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|