How do I control other applications with my C++ application?

Hey, I wanted to make a program that could open up and control another program...Specifically, I wanted to write a program that could open up google chrome, open 2 extra tabs, have each of the tabs go to hotmail, and then each auto-sign me in to my 3 different e-mail accounts. I was able to get google chrome to open, but after that I don't know what to do. Any ideas to point me in the right direction?

Before you can control the other programs with your C program, you need to know if they are controllable and how to control them. If they are controllable by passing them command line arguments and running them and that's all you need, any command you can make from the command line, you can also make from your C++ program, and any output from that program that was started from your program can be redirected to your C program or somewhere else. In linux, you can use fork() and execvp. I'm sure there's a way to do it in Windows, but I don't know what it is.

If you need to pass parameters to a browser like Google Chrome, libcurl might be the thing.