Windows: Uninstall an Application from the Command Line

Contributor Icon Contributed by shamanstears Date Icon July 23, 2008  
Tag Icon Tagged: Windows

By using the Windows Instrumentation command-line interface (WMIC), you can easily uninstall an application without having to use the GUI. Once you become familiar with the steps, it will be much faster than having to access the Add/Remove Programs applet in the Control Panel. This Tech-Recipe applies to Windows XP Professional, Windows Vista, Windows Server 2003 and Windows Server 2008.


1. Open a command prompt.

2. Input WMIC and press Return. You will see a prompt that looks like this:
wmic:root\cli>

3. At the new prompt, execute the following command:
product get name

This will generate a list of installed applications.

4. At the prompt, execute the following command:
product where name="” call uninstall

where application name is the name of the program you wish to uninstall (use the exact name provided by the previously generated list).

For example, if I were wanting to uninstall Adobe Reader 9, my command would look like this:
product where name="Adobe Reader 9" call uninstall

5. When prompted, input y to confirm that you wish to uninstall the application and press Return.

The application will be uninstalled.

Previous recipe | Next recipe |
 
  • Larz
    Great tip. Thank you.
  • uninstall
    thanx a million times
  • Javeed
    1. How about those products whose names in the registry are not direct names to search. How about names like HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{786C4AD1-DCBA-49A6-B0EF-B317A344BD66}
  • Creature
    Wow. Cool. I've been wanting to uninstall from command line for so long!
    How about quiet uninstall without typing y every time?
    Is it possible?
  • Pradeep
    Wow, this truely helped me. Thanks.
  • David
    This works for XP Pro, but what about one for XP Home?
  • MadTaffy
    Hi there,

    I was wondering if you could help, my pc wont boot up because of a app. called ready driver plus, i have tried every option i can think of and thats quite a few, like for e.g repair using installation disc, system restore using disc i've even tried using bootrec.exe in the command prompt when using the command prompt fro the reapair option on the installation disc, so i thought i would try to uninstall the program from there but i noticed the command prompt isn't in the C:\ drive its in a X:\Sources mode and the WMIC option you have mentioned doesn't seen to work, so i'm not sure if i need to get to the C:\ drive 1st which i would assume so but i have no idea how to get from this Administrator X:\Sources to the C:\ drive to be able to use the commands WMIC ... etc. so if you know how i do this i would be very very gratefull, many thanks in advance, best regards MadTaffy
blog comments powered by Disqus