Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted
Is it possible to uninstall SQL2005 from a command line? I've tried googling this but can only seem to find manual uninstall guides...
Posted (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 by SYNACK

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...