There are some tasks that C++ are perfect for, and there are others that are possible but will have you chasing your tail like a lost puppy. Your question falls into the later catagory. Instead of writing a program to press a bunch of keys, just create a startup entry.
If you want this application to start up when you log in then you'll drop the shortcut to the launcher in "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\". This will start the application for any user who logs into that PC.
EDIT: Sorry, this directory becomes "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" and is a hidden system folder in Windows 7.
If you want this to happen when the PC boots then you'll probably run into a few issues with application dependancies, also depending on what version of Windows you are running some methods are better then others. tl;dr I'll need more detail if this is what you are trying to do.
i know about that startup folder, msconfig and register entry thing i just want to learn how so send input commands without pressing any key using only a c or c++ console program.
and this is the task i want to do i want to create that program and put it on startup folder.
if you know about how to do things i mentioned above then please help me.
that SendInput() thing looks promising but i am facing some problem which i mentioned on my previous post.
What compiler do you use ? For sure it has a "prepocessor definitions" setting, define here _WIN32_WINNT, WIN32_WINNT, WINVER and _WINVER also as 0x0501 or higher.