Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 9th, 2004, 07:48 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #2 (permalink)  
Old September 10th, 2004, 07:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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

Reply With Quote
  #3 (permalink)  
Old September 10th, 2004, 07:46 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #4 (permalink)  
Old September 10th, 2004, 10:36 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #5 (permalink)  
Old September 10th, 2004, 11:13 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #6 (permalink)  
Old September 10th, 2004, 02:37 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #7 (permalink)  
Old September 13th, 2004, 11:12 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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
Reply With Quote
  #8 (permalink)  
Old September 13th, 2004, 04:30 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #9 (permalink)  
Old September 14th, 2004, 09:35 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
Reply With Quote
  #10 (permalink)  
Old September 14th, 2004, 05:37 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ask password when trying to uninstall apllication nilesh_lez Pro VB 6 0 August 3rd, 2007 04:51 AM
how to Uninstall a service MadJac C# 2005 3 December 6th, 2006 11:48 AM
MySQL - Uninstall Fix MySQL 2 April 12th, 2006 02:53 AM
Uninstall BETA's first Robert Reno BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 February 14th, 2006 12:50 PM
how do you uninstall php5? cardme42 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 September 2nd, 2004 09:42 PM



All times are GMT -4. The time now is 08:42 AM.


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