views:

174

answers:

4

I would like to run a browser (Internet Explorer) from a command prompt using a specific web address. As a result of that I would like to see a simple IE window without toolbars and address line. I wonder if JavaScript is able to control "parameters" of windows in which it is loaded. I mean, I want to add some JavaScript into my HTML code such that it change the window in which it is loaded.

+1  A: 

I do not think this is possible with Javascript (I hope it isn't as it would be a nightmare for web sites to be able to manipulate a browser in this fashion). If it is possible it is more likely that you can use command line arguments in the call to IE (anyone executing processes on the computer should have a higher level of trust than client code delivered as part of a web page). I do not know if such command line arguments exist.

However, you can create a new program that embeds a html renderer and then launch this from the command line. In Windows you can embed an Internet Explorer panel in your program and you will have complete control of what is shown bordering the IE panel.

Another popular choice for embedded HTML rendering is Webkit.

Some links on rendering web pages with c#:

sfg
Such command line arguments exists. But they are limited. I can get a window without toolbar and address line (using -k option) but it runs in the full screen mode, which is not acceptable in my case.
Roman
It sounds like embedding IE (or some other html renderer) in your own app is going to be best. In .net you can use the WebBrowser class to add IE rendering to your program.
sfg
A: 

Your best bet would be to write a small VBScript file that creats an InternetExplorer.Application object, shows it, sizes it, and navigates it to the target location.

Another alternative would be to create a HTA file (HTML Application) which has no address bar and can be sized as desired.

As another poster notes, web-based script doesn't have permission to do these things.

EricLaw -MSFT-
A: 

If you want to run it full screen then you can just run Internet Explorer in Kiosk mode. Just start it like this:

iexplore -k page

Sam Hasler
A: 

I think you're looking for window.open(url, '_self', 'location=no,toolbar=no,statusbar=no')

You'll want to put that into a sort of loader or gateway page that loads first and requests the actual content.

Ben Voigt