Rawns Posted June 30, 2010 Posted June 30, 2010 Is it possible to uninstall SQL2005 from a command line? I've tried googling this but can only seem to find manual uninstall guides...
SYNACK Posted June 30, 2010 Posted June 30, 2010 (edited) Use the original installer MSI which you can extract from the exe using the /extract switch. From the MSI you should be able to use the msiexec sql.msi /u command to uninstall it. There is a WMI way that does not require the installer also: Just run the below as a VBS and substitute "Personnel database'" With the exact name of the SQL Application. strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colSoftware = objWMIService.ExecQuery _ ("Select * from Win32_Product " _ & "Where Name = 'Personnel database'") For Each objSoftware in colSoftware objSoftware.Uninstall() Next http://msdn.microsoft.com/en-us/library/aa394588(VS.85).aspx Edited June 30, 2010 by SYNACK
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now