Have a look in www.rarlab.com, I think there is a commandline version you can get.