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

How to Uninstall SQL 2005 Expr instance?

Hola,

again I got a question 😉

At the moment I'm using a Basic MSI Projekt.

Installercontents:
- .Net 2.0
- Windows Installer 3.1
- SQL 2005 Server Epxress
- Our executables, dlls and so on

Installation works fine... Uninstall via "System Control" -> "Software" works as fine as the installation 🙂
BUT: I need to uninstall the prior installed SQL 2005 Express instance which was used by our product.

How can I do this???? I got a batchfile to to it "halfmanually"... but I need to perform the SQL instance killing automaticaly.

If you need more information to provide some help, let me know.

kind regards,
Gøran
Labels (1)
0 Kudos
(6) Replies
SaberRider
Level 5

I really need help with this one 😞
0 Kudos
SaberRider
Level 5

come on, what's the matter? There MUST be a way to get this to work, using a Basic MSI Projekt 😞
0 Kudos
Lurean
Level 8

If I understand the issue, you are trying to install a specific instance of SQL server express that you had installed previously? If this is the case then the only way I could think of to do this would be to create a custom action to execute a command line to uninstall the SQL express instance. If you have a batch file that you are using to do this now, you should be able to execute the batch file from a custom action to achieve this goal.

This kind of thing is a bit tricky to deal with because you are essentially requiring the user to uninstall a previously installed instance of a prerequisite third party software.

Are you using a different instance of SQL? Or are you needing to uninstall the previous one just to clear the data that was there? If you are just wanting to clear the old data you might want to consider using a SQL script to clean up SQL rather than uninstall it.
0 Kudos
SaberRider
Level 5

Hi,

thx for your reply...

I install a named instance of SQL 2005 Express (like "ErdtSystems"). During uninstallation I want do clean up the customers system. In this case I want to uninstall the SQL 2005 Express Instance (named "ErdtSystems"). Using a SQL Script to kill the DB is no problem. Deinstalling the SQL Instance is a problem.

I need the correct paras for the custum action. Can you help me out? I'm looking for this solution for about 3 weeks now 😞

The better way for me should be, to call a InstallScript Function via the CustomAction. So getting the correct "RunAtUninstall"-params for the CustomAction should be the key to the solution.

I added 2 screenshots, showing you my settings for the CustomAction and the the DirectEditor Settings

I hope you can help me.

Greetings & BIG THX,
Gøran
0 Kudos
Lurean
Level 8

your first problem is you are using a hard coded path. Verify that the setup.exe exists in that location. If it does exist it should be providing you with an error log if it is failing to uninstall.

MSDN article on using the command line to uninstalle SQL express.

http://msdn.microsoft.com/en-us/library/ms144259(SQL.90).aspx#uninstallscripts
0 Kudos
SaberRider
Level 5

thx 4 the help...

I solved it by using my own C# DLL runned by a Custom Action (ManagedCode) with Install Exec Sequence "After InstallInitialize" and the condition REMOVE~="ALL".

In my DLL I use the registry to resolve the location of the setup.exe.
Works fine as long as the windows update service is not installing anything...

THX & Greetings,
Gøran
0 Kudos