PRB: The SQL Server Desktop Engine Setup Program May Stop Responding When It Is Started from an External Application (824042)
The information in this article applies to:
- Microsoft SQL Server 2000 Desktop Engine (MSDE)
SYMPTOMSIf you start SQL Server Desktop Engine (also known as MSDE
2000) from a custom installer, the SQL Server Desktop Engine Setup program may
stop responding.
This problem occurs when your custom installer uses
the WaitForSingleObject function from its main thread to wait for the SQL Server Desktop
Engine Setup program to return. CAUSEDuring installation, several InstallShield components that
communicate their progress by broadcasting messages to all top-level windows
run. Because the messages are sent synchronously, if the calling application
owns a top-level window and is not processing messages that are sent to its
message loop, the InstallShield process stops responding until the application
closes. WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To work around this problem, the parent process can
use the WaitforInputIdle function before it calls the WaitForSingleObject function. The parent process can also spawn a second thread that
starts the SQL Server Desktop Engine Setup program. This method has an
advantage that the main setup process continues to be responsive while the SQL
Server Desktop Engine setup occurs. The following example is a Microsoft
Visual C++ code sample that demonstrates the use of WaitforInputIdle:
int InstallMSDE()
{
DWORD dwRes = 0;
if (!CreateProcess(_T("setup.exe"), NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
dwRes = GetLastError();
DisplayError(dwRes);
}
//Wait for MSDE setup to return
WaitForInputIdle(pi.hProcess, INFINITE);
WaitForSingleObject(pi.hProcess, INFINITE);
}
REFERENCES For additional information about how to track the progress
of an unattended installation of SQL Server Desktop Engine 2000, click the
following article number to view the article in the Microsoft Knowledge Base: 315463
HOW TO: Implement a SQL Server
2000 Desktop Engine Callback Function and Example
247221 PRB: Unattended Install of SQL Server 7.0 or MSDE 1.0 Stops Responding
Modification Type: | Major | Last Reviewed: | 6/30/2005 |
---|
Keywords: | kbUnattended kb3rdparty kbThread kbCodeSnippet kbDebug kbsetup kbUpgrade kbprb KB824042 kbAudDeveloper |
---|
|