I am trying to invoke msiexec from within a c++ program by doing

if( !CreateProcess(NULL, commandLine,
NULL, NULL, FALSE, 0, NULL, NULL,
&si, &pi ) )
{
<handle the error>
}
else
{
WaitForSingleObject( pi.hProcess, INFINITE );
<check error codes, etc>
}

The commandLine is “msiexec /qn+ /l* <user named logfile> /i <user selected msi file>”. When the CreateProcess is executed, the Windows Installer “preparing to install” dialog appears for a few seconds and then disappears and then when all is done the dialog indicating that the installation completed ok appears. When that dialog is OK’ed control returns to my program but now the “preparing to install” dialog is present again and it will not go away until I exit my program. The checks made after the WaitForSingleObject called indicated that all was successful (and separately verified that the installed product was present and usable).

What do I have to do differently to prevent the seemingly extraneous installer activity after control returns to my program?