473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Launching a URL from a batch file

VA
I have a report that is accessible by a URL.

How would I go about automating the launching of this URL using, say, a
batch file?

I can put

start iexplore.exe "http://my.url"

in the .bat file

but then the IE window stays open after launching the URL.

Is there a way to script this?

Thanks

Nov 23 '05 #1
8 47996
"VA" <us****@vikas.mailshell.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I have a report that is accessible by a URL.

How would I go about automating the launching of this URL using, say, a
batch file?

I can put

start iexplore.exe "http://my.url"

in the .bat file

but then the IE window stays open after launching the URL.

Is there a way to script this?

Thanks


Qualify "launch".

Usually one visits a URL with the intention of viewing it;
thus, "the IE window stays open" is the desired effect.

What are you trying to do? What does the Web page do?
Nov 23 '05 #2
VA
You are right, I should have explained better.

If I were to type/copy-paste that URL in IE manually, it would run a
Cognos report. and show the PDF output (In the background it also
prints the report and saves a copy of the PDF on the web server).

I would like to take the human element out of this by scripting this
interaction. i.e. have a script launch/invoke (dont know what else to
call it) the URL. The mere act of invoking that URL has the (desired)
side-effect of saving the PDF and printing it (thats part of the report
configuration).

Any ideas? Thanks

Nov 23 '05 #3
"VA" <us****@vikas.mailshell.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
You are right, I should have explained better.

If I were to type/copy-paste that URL in IE manually, it would run a
Cognos report. and show the PDF output (In the background it also
prints the report and saves a copy of the PDF on the web server).

I would like to take the human element out of this by scripting this
interaction. i.e. have a script launch/invoke (dont know what else to
call it) the URL. The mere act of invoking that URL has the (desired)
side-effect of saving the PDF and printing it (thats part of the report
configuration).

Any ideas? Thanks


Will this help?

Option Explicit
Dim objIEA
Set objIEA = CreateObject("InternetExplorer.Application")
objIEA.Navigate "http://my.url"
While objIEA.Busy
Wend
Set objIEA = Nothing
Nov 23 '05 #4
VA
Um, what is that? VB code? How/where would I run that from a batch file?

Nov 23 '05 #5
"VA" <us****@vikas.mailshell.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Um, what is that? VB code? How/where would I run that from a batch file?


Save it as IE.VBS.

Create IE.BAT which consists of:

cscript.exe IE.VBS

Nov 23 '05 #6
VA
It seems to do everything in the background, I dont actually see the IE
window spring up and close. Can I make it do that?

Is there a way to do a similar thing in Javascript (cscript
something.js), I am more familiar with Javascript than VB, just curious
to know if there is an equivalent solution.

Thanks

Nov 23 '05 #7
VA
Option Explicit
Dim objIEA
Set objIEA = CreateObject("InternetExplorer.Application")
objIEA.Navigate "http://www.yahoo.com"
objIEA.visible = true
While objIEA.Busy
Wend
objIEA.Quit
Set objIEA = Nothing

Seems to do what I want.

Thanks for the tip!

Nov 23 '05 #8
"VA" <us****@vikas.mailshell.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Option Explicit
Dim objIEA
Set objIEA = CreateObject("InternetExplorer.Application")
objIEA.Navigate "http://www.yahoo.com"
objIEA.visible = true
While objIEA.Busy
Wend
objIEA.Quit
Set objIEA = Nothing

Seems to do what I want.

Thanks for the tip!


You like JavaScript then how about:

var objIEA = new ActiveXObject("InternetExplorer.Application");
objIEA.navigate("http://www.google.com/");
objIEA.visible = true;
while(objIEA.readyState != 4) {}
objIEA.quit();
Nov 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: SkySea | last post by:
Hi! Any help on this would be appreciated... In an HTML document that lists instructions on installing some software, there's a point where a DOS batch file needs to be run in order to copy...
4
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup)...
3
by: KRK | last post by:
I am having one batch file and using this I can start my Server. It will execute all exes while starting. Now my question is how to debug my exe using this batch file?? Is it possible to execute this...
13
by: MLH | last post by:
I have a batch file named GetConf.bat. It contains a line like this: ipconfig /all >c:\MyAppDir\IPdata.txt I believe I could run the line with something like ShellWait by Terry Kreft. Any...
3
by: emman_54 | last post by:
Hi every one, I am trying to run a batch file using my asp.net application. I am using the Process class to run the batch file. When I run my web application, In the task manager, i could see...
1
by: steve | last post by:
Hi all, Here's some work in progress that should allow you to run a batch file as a custom action in a VS deployment project. Yup I know you can use js or wsh, but the target may not have...
0
by: ee_stevek | last post by:
hi guys, here is my problem: i have to maintain a web vb.net application developped some times ago. The application was developped on Windows2000 SP3 with Visual Studio 2003 (7.1). and the...
4
by: ed | last post by:
Hi all, I'm very new to vb (2nd day) and I need to create a small app that will replace my old batch file with a flashy gui. I had some experience with access 2.0 which helps ;) What I would...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.