Help with system() function

I am trying to make a program that helps someone recover a lost password. It works by calling "runas /profile /user:bob" and then entering a password from a wordlist until the program gets the password right. When this command is called the shell prompts for the user to input a password. How do I make the program input the password instead of the user?
Topic archived. No new replies allowed.