?
Solved

MSDE Removal or UNinstall Programmatically

Posted on 2005-05-05
5
Medium Priority
?
1,102 Views
Last Modified: 2009-03-06
Anyone know the standard or best way to remove an MSDE instance programmatically.

My setup app installs MSDErelA ok, and if sql is already on the box it adds an instance.

I really want to return the box to its original state whether it had sql (or other msdes) on there or not.
0
Comment
Question by:plq
  • 3
5 Comments
 
LVL 13

Accepted Solution

by:
ispaleny earned 2000 total points
ID: 13939587
Search in registry branch
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
GUID nodes for values
DisplayName like "Microsoft SQL Server Desktop Engine*"
SqlInstanceName = "YourInstanceName"

In such a node you can get UninstallString
MsiExec.exe /X{E09B48B5-E141-427A-AB0C-D3605127224A}
(guid changes)

Run the found command line from your uninstall program.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 13939644
It appears that running
   Setup /x path_to_dir_with_the_MSI_file

Where Setup.Exe is the exe that was unpacked into the unpacking directory.

You may need to add the parameter:
      InstanceName=your_instance_name

This google groups search indicates that a number of people have had problems with uninstalling MSDE.  There appears to be something related to Ms trying to avoid gaming the "throttling" issue by iunstalling multiple named instances.
 
    http://groups-beta.google.com/groups?q=MSDE+uninstall

-- Dan
0
 
LVL 8

Author Comment

by:plq
ID: 13939661
Thanks, yes I saw that in the reg but got frightened off by the guid. I'll have to loop through each reg key until I find a sqlinstancename that matches

Just thought ms would have provided an easier way !
0
 
LVL 8

Author Comment

by:plq
ID: 13939675
ps that was in response to ispaleny... will research some of dans thread in the morning. thanks
0
 
LVL 8

Author Comment

by:plq
ID: 13942878
msiexec seems adequate, although it does prompt for "Are you sure" which isnt ideal

thanks for helping
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question