I have a third party product that I hit a link to from within a .vbs running unattended on a server. Hitting the link starts an update process. When I hit the link, IE opens and the link returns a page that is blank except for the following code.

Code:
<script type="text/javascript" language="JavaScript">
this.window.close();
</script>
End Code:

This causes a dialog box asking if the browser can be closed to be created. Is there a registry setting or some way around this?

Thanks in advance,

Benje

Recommended Answers

All 5 Replies

Sorry, you cannot. This is by design: a script on one page should never be allowed to close a page on another domain wtithout first asking the user. This behavior is built into the browser itself.

I suspected that was the case. I guess I will have to write a script to run periodically that kills all the IE processes on the server.

Thanks for the response!

Sorry, you cannot. This is by design: a script on one page should never be allowed to close a page on another domain wtithout first asking the user. This behavior is built into the browser itself.

or simply build a program that monitors for the existance of that window (the asking window) and then closes it. Attached is the source code (in VB6) should you want it... and you can download the program itself (setup and all) from here:
http://www.aftermath.net/~coma/daniweb/asknot.zip

enjoy.

Thanks for the response, but our Data Security folks won't allow watchdogs like that to run on a web server without a lot of exception paperwork.

I am taking a look at httpcmd. This is a command line utility from MS that comes on the Server resource kit. This should allow me to hit a site without opening IE.

Thanks again,

Benje


or simply build a program that monitors for the existance of that window (the asking window) and then closes it. Attached is the source code (in VB6) should you want it... and you can download the program itself (setup and all) from here:
http://www.aftermath.net/~coma/daniweb/asknot.zip

enjoy.

Cool. I didn't suspect that they would, but I figured so long as they had source they would be happy..... *shrugs* no biggy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.