Spurius wrote a useful batch file for that end:
http://www.twcenter.net/forums/showthread.php?t=72697

You'll have to edit it a bit so that the right cfg file is created, though.