For accomplish this task you can take two ways (not mutually exclusives):
- use command line parameters
- use a configuration file
For managing conifiguration data check out my Common Utility Library (but be careful, the software is experimental and can change very quickly disrupting backward compatibility).
My personal taste is to use command line options and I've used the Command Line Parsing Library for this purpose for more than two years. The project will grow, but I think that for now is quite stable.