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