Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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
share|improve this answer

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]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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