PDA

View Full Version : MSDE SP4 install



jcarver
10-31-2005, 05:55 PM
I'm looking for some help with getting the MSDE install program launched from our (InstallShield MSI project) installer.

We have been installing MSDE with our package by launching the setup provided by Microsoft. It has been working fine, but now we want to have it install the service pack 4 version, which I have from the download site. I can install an MSDE instance on a target machine directly from a command shell, but when I launch it with the same command within InstallScript it hangs. The last line in the MSDE setup log is:
Executing "D:\Program Files\Microsoft SQL Server\80\Tools\Binn\sqlredis.exe /q:a /C:"setupre.exe -s -SMS MDACQFE=0""

The command line used to run setup was:
setup.exe /qb! /wait /L*v "<pathtologfile>" REBOOT=ReallySuppress SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 INSTANCENAME=<instancename> TARGETDIR="<path>" SAPWD="<passwd>"

Our sample target is Win2000.

Has anyone here experienced this or do you know what may have changed with this setup since service pack 3a? I haven't seen anything in the notes that gives me a clue.

Thanks,
John Carver

Holger_G
11-02-2005, 07:31 AM
Hi!

You should take a look here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;824042

jcarver
11-02-2005, 12:24 PM
Yes, I have seen this. The 'workaround' shown is in fact what we have been using. It's the same solution that is in the _LaunchAppEx sample provided by Stefan at InstallSite. But as of service pack 4 it no longer handles the problem.

A bit of history:
We originally used a loop around the API function GetExitCodeProcess until the return was no longer STILL_ACTIVE, to get the return value, but found that this would in some cases never terminate. So we replaced this with a call to WaitForSingleObject(pi.process, INFINITE). When sp3a for MSDE came along we found this no longer worked and added the call to WaitForInputIdle as shown in the MS sample. This worked. But now with sp4 it's stalling again. I've tried the original looping solution, and the installation succeeds on my test platform, but I don't think I can count on it.

A thread called "Failed MSDE install log - sqlredis.exe hangs?" on microsoft.public.sqlserver.msde describes a couple of possible solutions. One involves launching the setup then watching the output log file until it is released (rather kludgy). The other is to implement a callback function. I'm looking into this one. See also MS article 315463.

John Carver

AcuoMEC
11-04-2005, 02:43 PM
I used this in an exe I wrote to install a demo version of our product. I replaced WaitForSingleObject with:

while (result == (WAIT_OBJECT_0 + 1))
{
// Read all of the messages, removing each message.
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_QUIT)
{
return WM_QUIT; // If it's a quit message, exit.
}
DispatchMessage(&msg);
}

result = MsgWaitForMultipleObjects( 1, &procinfo.hProcess, FALSE, INFINITE, QS_ALLINPUT );

}

Don't know if this is the best way to code it but it seems to work. I did have a problem with WinRar causing this to hang but only if I entered license text in the WinRar self extractor (???).