p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2000 (http://p2p.wrox.com/forumdisplay.php?f=20)
-   -   MSDE Uninstall Doesn't (http://p2p.wrox.com/showthread.php?t=18175)

jeffg22 September 9th, 2004 07:48 PM

MSDE Uninstall Doesn't
 
Hi -

I have a VB.NET application that uses an MSDE database. I'm creating an install program that will install my app and a named instance of MSDE. I'm trying to make the process as easy and foolproof as possible for very nontechnical end-users. My development machine is WinXP Pro.

I'm having trouble with uninstalling MSDE. As most everyone knows, if _anything_ goes awry with an app, during installation or later, a very common resolution step to consider is an uninstall/reinstall. My problem seems to be with MSDE, so I skipped my app and just worked with MSDE. I installed it with the setup.exe provided by MS:

setup.exe /settings "eNP.ini" TARGETDIR="c:\Program Files\TestForMSDE100\MSDE\" DATADIR="c:\Program Files\TestForMSDE100\" SAPWD="Password356" /L*v "c:\Program Files\TestForMSDE100\MSDE356.log"

The referenced eNP.ini file contains:

[Options]
INSTANCENAME="eNP356"
SECURITYMODE=SQL
DISABLENETWORKPROTOCOLS=0

The install ran through to completion, and the log reported success. I then uninstalled the named instance using Add/Remove Programs from the Control Panel. That process ran without error. But the re-install failed. In the log file, the first occurrence of 'Return value 3' is about 80% down in the file:

Starting custom action UpgDetectBlankSaLogin()
Entering Function MyMsiEvaluateCondition
MsiEvaluateCondition for VersionNT returned TRUE
End Function MyMsiEvaluateCondition
Unable to open service.
Unable to connect as the SQL service is not running.
Ending custom action UpgDetectBlankSaLogin().
Action ended 16:26:37:
UpgDetectBlankSaLogin.2D02443E_7002_4C0B_ABC9_EAB2 C064397B. Return value 3.
Action ended 16:26:37: INSTALL. Return value 3.
MSI (s) (BC:70): Note: 1: 2262 2: Control 3: -2147287038
Property(S): UpgradeCode = {421A321C-2214-4713-B3EB-253F2FBCCE49}
Property(S): SqlDataDir = c:\Program Files\TestForMSDE100Property(S): SqlProgramDir = c:\Program Files\TestForMSDE100\MSDEProperty(S): SqlInstanceName = ENP356
Property(S): SqlSecurityMode = SQL
Property(S): SqlSa...
Property(S): SqlDisableNetworkProtocols = 0
Property(S): VersionNT = 501
Property(S): ALLUSERS = 1
Property(S): ARPNOMODIFY = 1
Property(S): DefaultUIFont = Tahoma8
Property(S): INSTALLLEVEL = 3
Property(S): LIMITUI = 1

I can get around the problem by going through the steps in the Microsoft KB article on manually removing .... But my end-users can't/won't. First, I'm pretty sure that msizap.exe (required by that procedure) can't be redistributed. Second, all I have to do is mention the word 'Registry' -- with or without the necessary standard dire warning -- and my users will say something like 'Sorry. I'm not interested in your app, just tell me how to get it off of my computer.' The answer to that request, of course, again involves the
same 'Registry' and you begin to see how unproductive the conversation will get.

I may be able to code an uninstall routine that will execute many of the 'manually remove' steps by deleting directories and registry entries, but I still can't redistribute msizap.exe. And I'm thinking there's gotta be a better way.

How can I implement what should be a simple uninstall/reinstall process that works ... simply??

Thanks for your help.

- Jeff

stu9820 September 10th, 2004 07:13 AM

I don't think you can legally package the MSDE in an app and sell it. You must use SQL Server or Access.


jeffg22 September 10th, 2004 07:46 AM

Thanks for your response -

First, you didn't answer the question posed in my post. Second, you can certainly redistribute MSDE as part of an app.

From Microsoft's MSDE Home page (http://www.microsoft.com/sql/msde/default.asp):

Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) is the free, redistributable version of SQL Server that’s ideal for client applications that require an embedded database, new developers learning how to build data-driven applications, and Web sites serving up to 25 concurrent users.

From Microsoft's Appropriate Uses of MSDE FAQ page (http://www.microsoft.com/sql/msde/howtobuy/msdeuse.asp):

Q. Can I include and redistribute MSDE as part of applications that I develop?

A. Yes, you can register to receive free redistribution rights for MSDE. Also, if you obtained MSDE by licensing one of the following products or services, you are licensed to redistribute MSDE as part of your applications:

ASP.NET Web Matrix*
MSDN® Universal, Enterprise, and Professional subscriptions
Microsoft Office XP Developer Edition
SQL Server 2000 Developer, Standard, and Enterprise Editions
Microsoft Visual Studio® .NET Architect, Developer, and Professional Editions*
Microsoft Visual FoxPro® 7.0 or 8.0

- Jeff

sal September 10th, 2004 10:36 AM

I do not understand why your users would have to un install MSDE. Something does not make sense. If you are giving the an app in MSDE, include a disk with a copy of MSDE for installation and have them install that sepparatly. Then you can cerate your database from a backup database file.

Now, if they have SQL Server they should have the option of where to install the Database.

Why do users need to uninstall? Do they understand that the PC where they install MSDE will be uses as a Server of sorts?



Sal

jeffg22 September 10th, 2004 11:13 AM

Hi Sal -

Well, in the interest of making the install as simple as I can for end users, I'm calling Microsoft's MSDE Setup (yes, they allow me to do this) from my setup program. So, if everything goes well, the user only needs to run my setup and everything installs just fine. He runs my installed app, and it runs just fine. He doesn't even need to know how to spell MSDE!

The problem arises if anything should go wrong, during installation or thereafter (as described in my post). Even if everything goes fine, if the user evaluates my installed app, decides he doesn't want it (so he uninstalls), then later changes his mind and wants to install it, he's out of luck.

I would think that an uninstall should be sufficiently 'well-mannered' to fully remove the named instance of MSDE that was installed. And I also want the user to be able to reinstall if he chooses.

Maybe I'm being old-fashioned here, but I'd expect, for any application, that an uninstall/reinstall process would not fail. And it does fail, even for just MSDE (without any application).

Oh, by the way, does anyone have an answer to my question??

- Jeff

sal September 10th, 2004 02:37 PM

Try un-installing any programs and re-installing and you are in DLL HELL. If you have an easy way to do this, let me know. Remember that you are using Windows and you have no control on that.

I have installed many apps that I can not un-install so your is not the first.

When I installed VS.NET on my pc, I had two installs, one the pre-requisites and the other the actual product. Your pre-requisite is MSDE.



Sal

Hal Levy September 13th, 2004 11:12 AM

Jeff,

I suspect that there is a bug in the MSFT uninstall and they have chosen not to fix it, but give the manual instructions in the Knowledge Base. You would need to check with MSFT for the license rules for the program required and see if you can redistribute it.

Sorry I can't help more



Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee

jeffg22 September 13th, 2004 04:30 PM

Thanks Hal -

I suspect you're right about the bug. It would be nice if MS would at least own up to it.

I'm not sure what you mean by "the program required" or even if there is such a program. Can you please clarify?

- Jeff

Hal Levy September 14th, 2004 09:35 AM

You mentioned msizap.exe and if it could be redistributed.....

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee

jeffg22 September 14th, 2004 05:37 PM

Thanks Hal -

I'm still pretty sure that I can't redistribute msizap, and in any event, it (and the registry) aren't very user friendly for nontechnical users.

I seem to be making progress, though, but the problem is not yet solved. I now am able to do an uninstall/reinstall of MSDE so the (reinstall) log file reports success. Now, however, I am unable to start the reinstalled instance as a service.

The change I made to get a successful reinstall was to have my install program install (and reinstall) MSDE with a blank password. With a blank password, the reinstall reports success; with a non-blank password, it fails. I was planning to have my app change the password when it is first run.

But, again, I can't get the service to start. Here's what I did:

1. Installed MSDE (blank password)
2. Rebooted --> the service started automatically
3. Uninstalled MSDE using Add/Remove Programs in the Control Panel
4. Deleted the Data directory for the instance
5. Rebooted -->
        Problem: I got a Net Service Configuration Error
                 "The specified service does not exist
                  as an installed service."
                  For users wanting to simply remove my app and MSDE,
                  how do I prevent this message??
6. Reinstalled MSDE (blank password)
7. Rebooted (I didn't get the above Net Service Configuration Error)

At this point, the log file reports success and the instance (ENP356) shows as an installed service (MSSQL$ENP356), but it's stopped. When I try to start it using the Microsoft Management Console, I get:

"The MSSQL$ENP356 service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."

I also tried starting the service with net start. I opened a cmd window and ran:

net start MSSQL$ENP356

The following lines were then displayed:

The MSSQL$ENP356 service is starting.
The MSSQL$ENP356 service could not be started.
The service did not report an error.

More help is available by typing NET HELPMSG 3534.

OK, so when I typed NET HELPMSG 3534, the following (not very helpful) line was displayed:

The service did not report an error.

How can I get the reinstalled instance started??

- Jeff


All times are GMT -4. The time now is 05:02 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.