I'm writing an application that needs to call a console program to generate a password (htpasswd.exe shipped with apache web server). When used from a DOS console, the syntax to use is :

htpasswd [-c] c:\passwordfile username

Next, the prog ask for the password twice and end.

My question is, how do I start the prog and how do I control it ?