MSDE Removal or UNinstall Programmatically

Posted on 2005-05-05
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.
Question by:plq
    LVL 13

    Accepted Solution

    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.
    LVL 49

    Expert Comment

    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
    LVL 8

    Author Comment

    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 !
    LVL 8

    Author Comment

    ps that was in response to ispaleny... will research some of dans thread in the morning. thanks
    LVL 8

    Author Comment

    msiexec seems adequate, although it does prompt for "Are you sure" which isnt ideal

    thanks for helping

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now