cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
loyalp
Level 5

MSDE Update Fails

I've an InstallScript MSI package that I'm using to lay down SQL Server Express 2005. New installs are working flawlessly, but we previously put down MSDE with our product and we will need to update that MSDE install to SQL Server Express 2005.

In the script, I'm using SQLEXPR.EXE and cmd line parameters with LaunchAppAndWait.

Interestingly, if I launch the SQLEXPR.EXE with the same cmd line from Run, then it upgrades and everything is fine. It's just when being launched from InstallShield that we seem to have an issue.

From the log created, the problem is nearly the very last step where it attempts to Uninstall MSDE.

Does anyone have familiarity with a similar issue? Would posting part of the log here help with figuring this out? I'm really just stuck at this point.

Thanks!
Labels (1)
0 Kudos
(23) Replies
hidenori
Level 17

Does the problem occur if you install Microsoft SQL Server Express 2005 using the setup prerequisite instead of LaunchAppAndWait?
0 Kudos
loyalp
Level 5

hidenori wrote:
Does the problem occur if you install Microsoft SQL Server Express 2005 using the setup prerequisite instead of LaunchAppAndWait?


Yep.

First off, there's the BPAClient issue when doing an upgrade: http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/2a5f460b-8684-4510-8fcb-1e9d9786baff/

But that's easily handled per that link.

And that leads us to this issue with the failure at the end. What can I provide to help diagnose the problem?
0 Kudos
loyalp
Level 5

Wait a minute. Sorry, there was an error at the end of the upgrade install, but it was not the same as the uninstall error from using LaunchAppAndWait.

I simply had a bad condition on the prerequisite that was not being met.

So, yes, using the prerequisite actually worked fine in upgrading from MSDE to SQL Server Express 2005. I'm not sure if I can actually use the prerequuisite to achieve the goals of the install, though.
0 Kudos
hidenori
Level 17

You may want to consider writing your own executable in C++ that will launch the Microsoft SQL Server Express 2005 redistributable, and run it as a setup prerequisite from your setup.
0 Kudos
loyalp
Level 5

There are some key pieces of information we gather from setup dialogs before we can proceed with any part of installing or upgrading SQL Server Express 2005.

The scripting solution has been great for us in the past, and if this one problem were resolved would still be ideal for us. Is there something wrong with the way IS is launching the SQL Server Express 2005 package?
0 Kudos
hidenori
Level 17

Where do you call the LaunchAppAndWait function? Due to the limitation of Windows Installer technology, you must launch another MSI from the InstallUISequence.
0 Kudos
loyalp
Level 5

The custom function using LaunchAppAndWait is called in the script during Dlg_SetupType: as one of the primary pieces of needed information is the SetupType selected.
0 Kudos
hidenori
Level 17

Can you try the LaunchApplication InstallScript function with the LAAW_OPTION_USE_SHELLEXECUTE option instead of LaunchAppAndWait?
0 Kudos
loyalp
Level 5

hidenori wrote:
Can you try the LaunchApplication InstallScript function with the LAAW_OPTION_USE_SHELLEXECUTE option instead of LaunchAppAndWait?


Both LaunchAppAndWait and LaunchApplication produce the same failure even with the LAAW_OPTION_USE_SHELLEXECUTE option.

LaunchAppAndWait( szSetupPath, szCmdParams, LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_WAIT | LAAW_OPTION_USE_CALLBACK );


LaunchApplication( szSetupPath, szCmdParams, "", SW_NORMAL, 1000, LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_WAIT | LAAW_OPTION_USE_CALLBACK );
0 Kudos
hidenori
Level 17

In fact, I am able to successfully uprade MSDE 2000 SP3 to Microsoft SQL Server 2005 Express using both LaunchApplication and LaunchAppAndWait on my clean XP SP2 box. It seems a machine specific issue.

You may want to consider using the feature prerequisite which will be installed after you click the Install button on the ReadyToInstall dialog. Note that the new type of the setup prerequisite is currently available for Basic MSI and Web projects only.
0 Kudos
loyalp
Level 5

I have now tested on multiple machines and all of them fail, so I do not believe it is machine-specific at all. I guess it must be something in my scripting.

By the way, how did you workaround the BPAClient.dll issue in your own testing?
0 Kudos
hidenori
Level 17

In my testing, I just manually copy the BPAClient.dll to the C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\BPA\bin folder after I encountered the error. In a real setup, I guess you would need to install the file to that location before launching the Microsoft SQL Server 2005 Express setup.
0 Kudos
loyalp
Level 5

hidenori wrote:
In my testing, I just manually copy the BPAClient.dll to the C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\BPA\bin folder after I encountered the error. In a real setup, I guess you would need to install the file to that location before launching the Microsoft SQL Server 2005 Express setup.


Okay, that's what I'm doing there. Still can't figure out what must be going wrong with the InstallAppAndWait portion, though.
0 Kudos
loyalp
Level 5

Here is the function I'm using:

//---------------------------------------------------------------------------
// InstallSQLServerExpress2005
//---------------------------------------------------------------------------
function InstallSQLServerExpress2005()
NUMBER nResult;
STRING szSrcDir, szSetupPath, szCmdParams;

begin
szSrcDir = SRCDIR;
szSetupPath = SUPPORTDIR ^ "SQLEXPR.EXE";
LongPathToShortPath( szSetupPath );
szCmdParams = "/qb INSTANCENAME=MSSQLSERVER UPGRADE=SQL_Engine ADDLOCAL=All SECURITYMODE=SQL SQLAUTOSTART=1 DISABLENETWORKPROTOCOLS=0";
XCopyFile (szSetupPath, "C:\\Temp", EXCLUDE_SUBDIR);
szSetupPath = "C:\\Temp\\SQLEXPR.EXE";
nResult = LaunchAppAndWait( szSetupPath, szCmdParams, LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_WAIT | LAAW_OPTION_USE_CALLBACK );
//nResult = LaunchApplication( szSetupPath, szCmdParams, "", SW_NORMAL, 10000, LAAW_OPTION_WAIT | LAAW_OPTION_USE_CALLBACK | LAAW_OPTION_FIXUP_PROGRAM );
if ( nResult != 0 ) then
MessageBox("Error - Failed to launch SQLEXPR.EXE, aborting.", SEVERE);
abort;
endif;
end;


I call it in the "Dlg_SetupType:" just before the "goto Dlg_SdAskDestPath;" statement.

As I mentioned, the very same machine can be updated just fine by executing the SQLEXPR.EXE from the Run command with those same arguments.
0 Kudos
hidenori
Level 17

I tried your code, but the error was not reproducible on my XP SP2 box. The machine has .NET Framework 2.0 and Windows Installer 3.1 installed. Also, I installed Microsoft SQL Server 2005 Express SP2.
0 Kudos
loyalp
Level 5

What flavor of MSDE were you upgrading? This happens on ever single machine we have for testing.
0 Kudos
hidenori
Level 17

I upgraded MSDE 2000 SP3a.
0 Kudos
loyalp
Level 5

After some further testing, my install works with SQLEXPR.EXE version 9.0.1399.6.

The failure comes with version 9.0.4035.0. 😞
0 Kudos
hidenori
Level 17

Did you check out the Microsoft SQL Server 2005 SP3 Release Notes? You may need to apply the solution provided in Microsoft's KB article 958655 if your machines have Windows Installer 4.5 installed.
0 Kudos
gorchi
Level 2

I guess Your installation worked once but MS SQL 2005 EE didn't complete properly. Try uninstall SQL Native Client and WSS writer and do installation again. In my company we had some such problems.
And speaking of MS SQL Server 2005 express edition, is there any chance that MS SQL 2005 SP3 prerequisite will be available? On MS site one can download it at least from the middle of January 2009...

Regards,
Goran
0 Kudos