1

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

Ladadadada
  • 26,337
  • 7
  • 59
  • 90
Kinnari
  • 11
  • 1

2 Answers2

0

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
Greg Askew
  • 35,880
  • 5
  • 54
  • 82
0

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]
RobW
  • 2,806
  • 1
  • 19
  • 22