Uninstall programs from windows command line

by admin on June 6, 2011

Sometimes we will have to uninstall a  program or software in automated way which does not require any user interaction. We can use wmic product command in such scenarios. Below you can find the syntax and also few examples.

Below is the command we need to use to uninstall a program.

wmic product where “description=’program name’ ” uninstall

Below are few examples for uninstalling different programs.

Uninstall MySql server from command prompt

You can use the below command to install Mysql server 5.5

wmic product where “description=’MySQL Server 5.5′ ” uninstall

Note that you need to provide accurate program name along with the version if it’s part of the program name. wmic product get lists all the installed programs in the command prompt. You can use findstr command in combination with wmic command. For example to get the program name for mysql you can use the below command.

wmic product get | findstr /I /C:mysql

Uninstall web folders

wmic product where “description=’WebFldrs XP’” uninstall

{ 2 comments… read them below or add one }

Dz February 26, 2012 at 8:29 pm

You forgot to write, that WMIC shows information only about products installed by .msi installer.

Reply

Bill November 1, 2014 at 11:32 pm

C:\WINDOWS\system32>wmic [enter]
‘wmic’ is not recognized as an internal or external command, operable program, or batch file

From Windows XP Home edition SP3

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: