CMD Script: How to close the CMD

Use the start command:

start "title" "%ProgramFiles%\Internet Explorer\iexplore.exe" http://www.example.com

you need this on the end

&& exit

For example

"%ProgramFiles%\Internet Explorer\iexplore.exe" http://google.co.uk && exit 

@echo off
start "" "%ProgramFiles%\Internet Explorer\iexplore.exe" "http://www.example.com"
exit /b

But you really should not force IE, but use the default browser:

@echo off
start http://www.example.com
exit /b

exit /b does not work on win9x IIRC, so if you need to support every version of windows and close the terminal window if the user double clicks your batch file, go with:

@echo off
start http://www.example.com
cls