473,566 Members | 3,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 48005
"VA" <us****@vikas.m ailshell.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.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.m ailshell.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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("I nternetExplorer .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.m ailshell.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.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("I nternetExplorer .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.m ailshell.com> wrote in message
news:11******** *************@g 44g2000cwa.goog legroups.com...
Option Explicit
Dim objIEA
Set objIEA = CreateObject("I nternetExplorer .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(" InternetExplore r.Application") ;
objIEA.navigate ("http://www.google.com/");
objIEA.visible = true;
while(objIEA.re adyState != 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
10135
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 files from the CD to the hard drive. Given that CD drives can have various names, I wanted to run the batch file using relative paths. The problem...
4
47459
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) 4) Once the copy is complete, the batch file opens the Access database again 5) EXIT should close out the cmd window but it does not execute that...
3
2322
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 batch file from my prject debug session....
13
5416
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 reason I should run the procedure via a batch file call as opposed to launching the command string directly?
3
4442
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 cmd.exe with ASPNET as a user. But nothing happens. It can't execute the batch file. This is the code i am using to run the batch file:
1
24277
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 either.. Essentially it's just a wrapper for the Process class and a command interpreter. Warning, it only partly works. I had wanted to pass in ...
0
1718
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 application was running on windows 2000 SP3 with the usual IIS. Right now i need to make it work, on a Windows 2003 SP1 server (but i need the keep the...
4
13370
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 like is to get the output of the batch file to display on the gui as the batch file is running. if some of you understand unix... I want this: tail...
14
12781
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 case it's a question, i want to popup a messageBox or something, and bring back to the batch file the result (Yes\No question). I know how to excute...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.