How to close current window without alert pop-up

I have an batch file in the task schedule. It runs every night. The main purpose is to launch an IE window.
The problems bother me is when it finished loading, it is still there. So after one week, there are seven windows on the desktop. I forgot to mention, it is on one Windows server.
To make the task perfect, I do a search to find the way to close window without alert popup dialog box.

<!--
window.opener = null;
setTimeout('window.close();', 10000);
-->

To disable alert popup box.
window.opener = null;
Close window in ten seconds.
setTimeout(‘window.close();’, 10000);
This Javascript script do the job correctly.