I would like a batch file to launch two separate programs then have the command line window close. Actually, to clarify, I am launching Internet Explorer with two different URLs.
So far I have something like this:
start "~\iexplore.exe" "url1" start "~\iexplore.exe" "url2"
What I get is one instance of Internet Explorer with only the second URL loaded. Seems the second is replacing the second. I seem to remember a syntax where I would load a new command line window and pass the command to execute on load, but can't find the reference.
As a second part of the question: what is a good reference URL to keep for the times you need to write a quick batch file?
Edit: I have marked an answer, because it does work. I now have two windows open, one for each URL. (thanks!) The funny thing is that without the /d approach using my original syntax I get different results based on whether I have a pre-existing Internet Explorer instance open.
Step 1: Open Internet Explorer. Step 2: Select the Tools button at the top-right of the window. Step 3: Choose the Internet Options button. Step 4: Type the addresses of the Web pages that you want to use as your startup tabs into the Home page field at the top of this window.
To create a Windows batch file, follow these steps: Open a text file, such as a Notepad or WordPad document. Add your commands, starting with @echo [off], followed by, each in a new line, title [title of your batch script], echo [first line], and pause. Save your file with the file extension BAT, for example, test.
Try this in your batch file:
@echo off start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE www.google.com start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE www.yahoo.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With