Uninstall Instance of SQL Server 2008 R2 Express

Got a problem you cannot solve? Try here.
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Uninstall Instance of SQL Server 2008 R2 Express

Postby JohnGalt » Wed Jul 14, 2010 9:34 am

How can I get the uninstall process to uninstall SQL Server 2008 R2 Express (named instance that will never be used by anyone else) on uninstall automatically?

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Uninstall Instance of SQL Server 2008 R2 Express

Postby mills » Thu Jul 15, 2010 5:29 pm

Try this:

Install SQL Express (command line: /qn REMOVE=SQL_Engine INSTANCENAME="$INSTANCE_NAME$", get result into variable SQL2005)
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Re: Uninstall Instance of SQL Server 2008 R2 Express

Postby JohnGalt » Fri Jul 16, 2010 12:44 pm

Where would I put this? (and what is the path for the uninstall for it?)

JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Re: Uninstall Instance of SQL Server 2008 R2 Express

Postby JohnGalt » Fri Sep 17, 2010 2:26 pm

*ping*

How would I add this to the uninstall process safely ensuring that I get the right directory to run the uninstall etc.?

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Uninstall Instance of SQL Server 2008 R2 Express

Postby mills » Fri Sep 17, 2010 8:00 pm

I apologize, as I'm confident my previous example won't work. That's only good for installing.

The first objective would be to figure out how to uninstall SQL Server without using IA (and with the command line)...

This article might help:
http://support.microsoft.com/kb/955499

You're likely going to need to consult Microsoft on this.

But, once you have that figured out, you should be able to place the code to do it either immediately before or after your Apply Uninstall command, since it shouldn't matter whether your program is installed or not.

I would re-use the checksql... script to be sure that it is currently installed and then "if Variable SQL2008R2_X86 not Equals FALSE", then do the uninstall.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 34 guests