MSDE Removal or UNinstall Programmatically

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.
Who is Participating?
Search in registry branch
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.
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:

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.

-- Dan
plqAuthor Commented:
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 !
plqAuthor Commented:
ps that was in response to ispaleny... will research some of dans thread in the morning. thanks
plqAuthor Commented:
msiexec seems adequate, although it does prompt for "Are you sure" which isnt ideal

thanks for helping
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.