Added support for autostart on Windows.