I have multiple URLs to execute. I am currently using below method

I am creatving a vbs file with below content

Option Explicit
Dim objIEA
Set objIEA = CreateObject("InternetExplorer.Application")
objIEA.Navigate "http://www.xyz=<variable1>&abc=<variablea>"
objIEA.Navigate "http://www.xyz=<variable2>&abc=<variableb>"
objIEA.Navigate "http://www.xyz=<variable3>&abc=<variablec>"
objIEA.visible = false
While objIEA.Busy
Wend
sleep 15
objIEA.Quit
Set objIEA = Nothing

Here I have pasted all the URLs with all the variables & saved this file as xyz.vbs

I am executing this vbs file through batch file using below mentioned code cscript.exe abc.VBS

The only issue is I am not able to capture the logs of the URL execution. With each URL execution, there would be a response in text which I want to capture

Pls suggest

link|improve this question
feedback

2 Answers

You may want to execute this from a cmd file, and redirect the output to a log, like below:

@ECHO OFF
FOR /F "tokens=1-8 delims=:/. " %%a IN ('echo %date% %time%') DO SET LogFile="C:\TEMP\applog_%%d-%%b-%%c-%%e-%%f-%%g.log"

cscript.exe abc.VBS >> %LOGFILE% 2>&1
link|improve this answer
feedback

If I understand your question correctly, you can use wget.exe to obtain the messages from execution.
For example,

WGET.EXE -o mylog.txt http://www.google.com

returns the default Google web page (index.html), and mylog.txt. Mylog.txt contains:

type mylog.txt
--2011-12-21 12:24:30--  http://www.google.com/
Resolving www.google.com... 74.125.227.82, 74.125.227.83, 74.125.227.84, ...
Connecting to www.google.com|74.125.227.82|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `index.html'

     0K .......... .                                           2.42M=0.005s

2011-12-21 12:24:30 (2.42 MB/s) - `index.html' saved [11954]
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.