MSDE sp3 Installation Hangs
-
I am having trouble installing MSDE. I am attempting to launch the installation via another setup program I am writing. This setup will install a lot of prerequisites that another app needs, one of them being MSDE. The problem is that when I launch the MSDE installation all goes well until a little over half way through, when it just hangs. Nothing happens, ever. I can do this repeatably. I can call the setup.exe from C#, MC++ using .NET and using Win32, and also straight Win32. All cause the installation to hang. It seems to have to do with waiting for the process to finish, because if I don't use
Process.WaitForExit
orWaitForSingleObject
the installation will continue and finish even if launched from my app. But calling these functions causes a hang. Here is another post about Delphi: link[^] Here is a Win32 DLL function that I wrote (took from the above post, he said it worked for him) that causes the problem.#define APPLICATION NULL #define COMMANDLINE _T("MSDE\\Setup.exe sapwd=testpassword") #define CURRENTDIR NULL extern "C" __declspec(dllexport) int NativeLaunchMSDEInstaller() { STARTUPINFO si; PROCESS_INFORMATION pi; DWORD dwExitCode; BOOL br; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); br = CreateProcess(APPLICATION, COMMANDLINE, NULL, NULL, FALSE, 0, NULL, CURRENTDIR, &si, &pi); if (br) { CloseHandle(pi.hThread); WaitForSingleObject(pi.hProcess, INFINITE); GetExitCodeProcess(pi.hProcess, &dwExitCode); // wprintf(L"Setup.exe returned exit code %d", dwExitCode); CloseHandle(pi.hProcess); } else { // wprintf(L"Error %d in CreateProcess", GetLastError()); return GetLastError(); } return 0; }
Thanks for any help (or atleast a verification that this is a problem), Nathan --------------------------- Hmmm... what's a signature?