JSI Tip 1747. How do I get IE to open at a specific URL with a window at a fixed location and size?.

Jerold Schulman

October 26, 1999

1 Min Read
ITPro Today logo


The steps to accomplish the subject task are:

1. Connect to the URL and create a Favorite.

2. Rename and/or move the favorite. Note that the hidden extension of this favorite is .URL.

3. Right click the .url file and press Properties.

4. Select the Web Document tab.

5. In the URL: text box, replace the URL, for example: http://www.jsiinc.com, with:

 javascript:window.resizeTo(,);window.moveTo(,);location.href="http://www.jsiinc.com"

where:

 The width of the window in pixels. 

 The height of the window in pixels. 

 The number of pixels from the left hand edge of the screen. 

 The number of pixels from the bottom of the screen. 


Press Apply and OK. You may receive:

The protocol "javascript" does not have a registered program. Do you want to keep the target anyway?

Press Yes. You may need to do this a few times.

To open IE with .url, either double click it, or place the .url in a batch (see tip 0090):

REM Switch to your prefered download directoryC:CD C:ZIPNEWREM Dial your ISPC:Winntsystem32RasPhone -d EntryNameREM Run the .url "C:folder.url"REM When you exit, hang upc:winntsystem32rasdial EntryName /DISCONNECTexit


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like