oke, two more questions to answer.
why automate this, well basically not speed up the process (developing my menu
program takes more time than typing the serial) but for the FUN and LEARNING
why not use an menu creator, I tried AutoPlay Media Studio and AutoIT.
AMS came closes to what I want...
AutoIt is, in my opion, unstable.

so back to my question.............

I made:

PID = _spawnlp(_P_NOWAIT,"C:\\setup.exe"," ",NULL);
lhwnd = NULL;
lhwnd_test = NULL;
while (lhwnd == NULL)
{
lhwnd = FindWindow(NULL, L"Call of Duty(R) 2");
if (lhwnd != NULL)
lhwnd_test = GetDlgItem(lhwnd, 1304);
if (lhwnd_test == NULL)
lhwnd = NULL;
Sleep(100);
}

any comments/ fine tuning

regards,

ger

ps, how do I posts the code more readable..