Java magic which, combined with Apache Commons Daemon, allows you to use .bat-scripts as a Windows Service.