There are several ways to open a URL from a command or from within a batch file line in Windows 2000. The first and easiest method is to use the START command:

START http://WWW.TECHTARGET.COM

By default, if there is already a Web browser

Requires Free Membership to View

open that last had focus, the URL will open in that one. Note that if the URL ends in ".com," you MUST prefix it with either "www." or "http://" (if the URL doesn't begin with a WWW extension). Otherwise, the command-line interpreter will think you're trying to launch a program with the extension .COM!

You can also use the START command to alter the priority of the launched process, through one of its command line switches. Type START /? to get a complete list of the command-line parameters available for it.

Another URL-launching method is to call Internet Explorer directly (provided that's your browser). This will always open a new instance of a browser:

"C:Program FilesInternet ExplorerIEXPLORE.EXE"
http://www.techtarget.com

The same restrictions about the URL apply here. For safety's sake, it's always best to add the "HTTP://" at the beginning of the URL.


Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter.


This was first published in July 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.