Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

DoInstall Function doesn't WAIT !


4 replies to this topic

djq

djq
  • Members
  • 10 posts

Posted 08 August 2006 - 14:43

The DoInstall function not waiting with WAIT nOptions parameter. When I put the MEDIA files on CD-ROM the principal installation call another in sub-directory with DoInstall function but he doesn't waiting he finish before calling another...

Please Help me is Urgent!

fracine@icstriplex.ca

Edited by djq, 08 August 2006 - 14:44.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 August 2006 - 16:14

If I recall correctly there was a known problem with DoInstall if the child install is located in a sub folder of the parent install. Try a sibling folder instead.

djq

djq
  • Members
  • 10 posts

Posted 08 August 2006 - 19:19

He doesn't waiting on CD-ROM... but if I copy all folder and sub-folders on Disc, the DonInstall function WAIT for launching others Setup.exe. I Have 8 Setup.exe lauching... You suggestion not work...

Please help me sad.gif

peterchen

peterchen
  • Members
  • 2 posts

Posted 22 August 2006 - 14:33

I ended up using my own support DLL, which just calls CreateProcess + WaitForSingleObject.

can send if you like

mmppeegg

mmppeegg
  • Full Members
  • 5 posts

Posted 27 April 2007 - 07:03

Hi,
I encountered the same problem.
My CD-ROM's folder is as below:
/////////////My CD-ROM/////////////
M:\
\AP
\Driver
-Setup.exe
-Autorun.inf
///////////////////////////////////////
The Setup.exe in root is a VC++ program which calls the subfolder \AP\Setup.exe which is InstallScript project; There is another InstallScript MSI Setup.exe under the subfolder \Driver. The VC++ program Setup.exe uses CreateProcess to perform subfolders install program, and waiting these programs exit.

While Setup.exe perform the InstallScript program, it seems not wait, but if is InstallScript MSI program, it waits. If I copy all to my HDD, all running correctly(it waits). It's strange!

Is InstallScript project have child process, so the VC program cant wait? Or I use wrong way? I use InstallShield 10.5. Below is my code:
////////////////////////////////////////////////////////////////////////////////////////////////
#define ITEM2SETUPPATH ".\\AP\\Setup.exe"
STARTUPINFO si;
PROCESS_INFORMATION pi;
DWORD dwExit;
TCHAR apIns[MAX_PATH];
HWND hWndMain = this->m_hWnd;

ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
wsprintf(apIns, "%s%s", szCurModPath, ITEM2SETUPPATH);

if( !CreateProcess( NULL, apIns, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi) )
{
::AfxMessageBox("CreateProcess() failed!");
return;
}
//Set itself to bottom.
::ShowWindow(hWndMain, SW_MINIMIZE);

WaitForSingleObject( pi.hProcess, INFINITE ); // Wait until child process exits.
GetExitCodeProcess(pi.hProcess, &dwExit);

CloseHandle( pi.hProcess ); // Close process and thread handles.
CloseHandle( pi.hThread );

//Set itself to desktop
::ShowWindow(hWndMain, SW_RESTORE);
//////////////////////////////////////////////////////////////////////////////////////////////
Anyone can help me??

Edited by mmppeegg, 27 April 2007 - 09:24.