Windows: Uninstall an Application from the Command Line

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.

 

About Rob Rogers

Once a prolific author here on Tech-Recipes, Rob has moved on to greener pastures.
View more articles by Rob Rogers

The Conversation

Follow the reactions below and share your own thoughts.

99 Responses to “Windows: Uninstall an Application from the Command Line”

  1. January 06, 2009 at 8:51 pm, Larz said:

    Great tip. Thank you.

    Reply

  2. February 01, 2009 at 4:25 pm, uninstall said:

    thanx a million times

    Reply

  3. April 23, 2009 at 1:24 pm, Javeed said:

    1. How about those products whose names in the registry are not direct names to search. How about names like HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall{786C4AD1-DCBA-49A6-B0EF-B317A344BD66}

    Reply

  4. April 30, 2009 at 1:56 pm, Creature said:

    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?

    Reply

    • April 19, 2012 at 12:43 pm, Tezdoll said:

      > /node:computername product where name=”McAfee Virusscan Enterprise” call uninstall /nointeractive

      Reply

      • June 26, 2013 at 1:37 pm, kiran said:

        i am able to manage untill the fourth step..but without the option of entering “y” to confirm delete ..it says “Alias not found”
        what does this mean ..?

        Reply

        • August 01, 2013 at 10:44 pm, Francis Teh said:

          > try using this method, note the single and double quotation marks used –> product where “name like ‘Smart-X CoreConfigurator’” call uninstall

          Reply

      • February 06, 2014 at 5:16 am, vinod said:

        > how to avoid restart ??

        Reply

    • April 04, 2014 at 7:05 am, Ivan said:

      /nointeractive

      Reply

  5. May 28, 2009 at 8:23 pm, Pradeep said:

    Wow, this truely helped me. Thanks.

    Reply

  6. June 02, 2009 at 8:19 pm, David said:

    This works for XP Pro, but what about one for XP Home?

    Reply

  7. June 15, 2009 at 6:17 pm, MadTaffy said:

    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

    Reply

    • March 23, 2011 at 11:50 am, Fd said:

      just type in C:

      Reply

  8. July 21, 2009 at 7:08 am, Anonymous said:

    This doesn’t work on WinXP Pro SP3 32bit. Entering “product get name” at the “wmic:rootcli>” prompt gives the following error:

    Code = 0×80041001
    Description = Generic failure
    Facility = WMI

    Typing in “/?” to see the list of commands or help, gives me a listing of commands, but it doesn’t contain “product”. I’m guessing maybe that what causes the error.

    Reply

    • December 15, 2010 at 4:16 pm, Dbritton said:

      Try running the command prompt as a user who is a local adminstrator. This worked for me when I encountered the same problem.

      Reply

  9. August 06, 2009 at 2:10 pm, will said:

    is there a way is assume yes instead of waiting to be prompted?

    Reply

  10. September 24, 2009 at 9:34 pm, blak3r said:

    wmic:rootcli>product get name
    Node – MyComputerName
    ERROR:
    Code = 0×80041010
    Description = Invalid class
    Facility = WMI

    Shrug

    Reply

  11. October 15, 2009 at 6:55 am, Anonymous said:

    the command “product get name” is not showing all the installed programes ,then how can i uninstall the desired one .plz send me reply.

    Reply

  12. October 15, 2009 at 6:57 am, Anonymous said:

    the command product get name is not showing all the programmes then how can i uninstall the desired one send me reply.

    Reply

  13. October 22, 2009 at 2:06 am, Anonymous said:

    Beautiful. Ever since i started working with cmd, I’v always known it was the final stop for force removals. After uninstalling some programs to free up space, they still run in start-up. I just deleted the shell folders in program files and will carry out the instruction as above just for keeps.
    thanks shamanstears. cheers.

    Reply

  14. October 27, 2009 at 6:44 pm, Nag said:

    I got the following error:
    Node – my system name
    Error:
    code = 0×80041010
    Description = Invalid class
    Facility = WMI

    Reply

  15. October 27, 2009 at 10:48 pm, Anonymous said:

    Can I create a bat file?

    Reply

  16. October 29, 2009 at 9:59 pm, kiran said:

    thanks a lot

    Reply

    • October 28, 2010 at 10:25 am, Love said:

      use again

      Reply

  17. January 21, 2010 at 7:48 pm, Techno said:

    It doesnt work on my XP sp3 !
    I get a
    Node – machinenamehere
    ERROR:
    Code = 0×80041001
    Description = Generic failure
    Facility = WMI

    Reply

  18. January 26, 2010 at 10:01 am, Omi said:

    For those who are having problems, please use the following command to uninstall under Windows XP SP3 (it’s working for me):

    wmic
    product “your_program_name” call uninstall /nointeractive

    Also you can run the command directly either on a command console or into a batch file:
    wmic product “your_program_name” call uninstall /nointeractive

    NOTE: /nointeractive bypass Y/N prompt assumming YES

    Hope it works for you!

    Reply

  19. April 17, 2010 at 9:13 pm, Anonymous said:

    Does this also work on Vista Home basic? I bought CSI deadly intent,and it wont play because d3dx9_41.dll cannot it be found. it says reinstalling should fix it,but the problem is , it wont uninstall from control panel ,,so I hope this works for vista too…if not,if anyone knows could you please let me know how,,I would really appreciate it.

    jen

    Reply

  20. May 21, 2010 at 10:24 am, Roushan said:

    thank you very much..i fixed my bluescreen prob using that :)

    Reply

  21. June 28, 2010 at 4:42 am, Eric said:

    Does this work in Windows 7?

    Reply

    • July 06, 2010 at 10:01 pm, Asdlfkj said:

      Yes

      Reply

  22. June 30, 2010 at 9:06 am, ml said:

    very useful

    Reply

  23. July 15, 2010 at 11:25 am, Gjbedi said:

    Not working for WINDOWS 2003 R2

    Reply

  24. July 15, 2010 at 11:27 am, Gjbedi said:

    Not working for WINDOWS 2003 SP2

    Reply

  25. July 18, 2010 at 12:04 pm, Nagaraju Vasamsetty said:

    excellent

    Reply

  26. October 06, 2010 at 6:04 pm, Marcoapdealmeida said:

    I just want to replace a windows xp pro from my pc and install a home edition, however I haven got only cds for the home edition and the xp pro doesn’t allow the home edition to take control in the boot. When trying format on the command line, the setup response is that is not possible because there are processes running. Any suggestion?

    Reply

  27. October 14, 2010 at 7:13 pm, Deeprothan87 said:

    Not working

    Kuldeep Singh

    Reply

  28. October 15, 2010 at 9:34 am, Adham da great said:

    thanks

    Reply

  29. December 19, 2010 at 12:06 am, Rudyguerrero48 said:

    thank u very much! works very well

    Reply

  30. January 10, 2011 at 6:32 pm, Petey said:

    Looks really useful, however the problem program for me does not appear in the list of installed programs; does this mean that it is not actually installed and can therefore just be deleted. It is PC Mighty Max 2007 – it is less than a MB but after trying to access it to find an uninstall facility it became very disruptive, popping up and using memory and generally being a real pain.

    Reply

  31. February 14, 2011 at 10:42 am, Anil said:

    How to write this in batch file

    Reply

  32. April 04, 2011 at 11:49 am, Anon19 said:

    For the people that seem to be having issues with running this, the WMI command needs the latest .net framework to be installed. Check windows update, and make sure you have the latest updates installed.

    Reply

  33. April 15, 2011 at 1:53 pm, Sonylaptopfrank said:

    hello,

    i cannot start my windows 7 in safe more or use recovery function, what can i do ?

    problem happened after windows 7 update, then after restart windows defender asked me to restart again, and then blue screen or auto restart forever.

    i would like to disable or uninstall windows defender as i can access the command prompt but i can’t find how to do ?

    And do you know how to uninstall windows latest update with command prompt ?

    Thanks for help.

    Reply

  34. April 21, 2011 at 7:49 am, Madhurao1983 said:

    How to Uninstall patch from command line

    Reply

  35. May 25, 2011 at 7:50 pm, Dd said:

    to uninstall an MSI >>>  “/c msiExec /uninstall c:nstaller.msi /quiet”
    for exe ….    /uninstall c:Installer.exe

    Reply

  36. December 13, 2011 at 7:27 am, Andreas said:

    This saved me a ton of work.

    Thanks!

    Reply

  37. January 03, 2012 at 7:25 pm, Mahesh C said:

    It works great ! on my XP sp3

    Reply

  38. January 24, 2012 at 10:06 am, Oz said:

    this is great, but how can I stop the computer from doing a reboot after I uninstall?

    Reply

    • June 06, 2012 at 4:02 am, Hunter said:

      > Use shutdown -a after issueing the command.

      Reply

  39. March 06, 2012 at 7:14 am, max said:

    it’s not working on my vista, which coomand will best help me uninstall a program from the command prompt in windows vista. thank you

    Reply

  40. April 16, 2012 at 9:37 pm, Lorrie said:

    I am running Windows Vista on a Toshiba Satellite A215-S5818 laptop, which cannot boot, even to safe mode. Startup Repair, System Restore, and even the Toshiba Recovery Disk fail. I can only run a command prompt from the Recovery Console. This command doesn’t work. I get as far as the wmic:root\cli> prompt. When I type “product get name” I don’t get a list of installed programs, I get:

    Node – MINWINPC
    ERROR:
    Code = 0×80041010
    Description = Invalid class
    Facility = WMI
    ERROR:
    Code = 0×80040154
    Description = Class not registered
    Facility = Interface

    Reply

    • July 18, 2012 at 8:54 pm, Cliff Steinman said:

      > Lorrie, invalid class means that WMI isn’t available or is corrupt. You’re having major OS problems and most likely won’t be able to access WMI from the recovery console, especially to add and remove programs.

      Reply

  41. April 19, 2012 at 1:11 pm, Nat said:

    Thank you!!!

    Reply

  42. April 30, 2012 at 4:51 pm, Tecum Technology said:

    If fun and fantastic God bless

    Reply

  43. May 03, 2012 at 9:24 am, Raj said:

    It gives mee error like this

    Uninstall-Invalid alias verb

    Reply

  44. May 30, 2012 at 12:06 pm, Prem Kumar said:

    Is there any option to silently install software through this cmd.

    Reply

  45. June 13, 2012 at 7:59 am, Charlejack said:

    Hello,

    The Tip Was Very Useful……..! But i need one help r u convert it into Batch file.?

    Reply

  46. July 18, 2012 at 8:52 pm, Cliff Steinman said:

    Ok, don’t worry about throwing the /nointeractive flag in there, that’s superfluous. From a command prompt, or batch file, just add wmic at the beginning. You don’t have to invoke wmic first.
    wmic product where name=”Program Name” call uninstall can be used from the command line or batch file. Since it’s called from outside the wmic program it doesn’t confirm uninstall.
    Second, invalid alias means you have something in the wrong place or missing. Make sure your uninstalls are structured one of these ways
    Local: wmic product where name=”Product Name” call uninstall or wmic product where “name like ‘%oduct Na%’” call uninstall
    Remote: wmic /node:compname product where name=”Product Name” call uninstall or wmic /node:compname product where “name like ‘%oduct Na%’” call uninstall

    Notice you can use wild cards (%) to match names but you may end up uninstalling more than one program so be careful about what your statement could match. Make sure you put doubles around name and singles surrounding the wildcard statement.

    Reply

  47. August 15, 2012 at 7:24 am, Sunny said:

    Thanks a lot man, saved my day :-)

    Reply

  48. September 04, 2012 at 4:46 pm, Chris said:

    Ran into a small problem.

    I’m trying to use this to uninstall ESET Nod32 Antivirus

    This works great if I remove the password from within ESET but if I don’t remove the password before doing this I get the following message

    Method Execution Successful
    Quit Parameters”
    Instance of __Parameters
    {
    Return Value = 1603;
    };

    Any ideas how I can incorporate the password into this?

    Thanks!

    Reply

  49. September 20, 2012 at 6:19 am, raj said:

    hey i am trying to logon through administrator , administrator logon on my pc but not show me any icon and show me only black screen on my desktop and i am not able to open any program my cursor also not working means i can not open any thing please give salutation

    Reply

  50. October 04, 2012 at 4:21 am, Gaurav said:

    Well..can you tell me how can i take access of wmic root from a domain user (coz i get access denied) but i have the local admin password but still want to use the “run as admin” feature

    Reply

  51. November 11, 2012 at 1:11 pm, Amandah said:

    I tried this and it didn’t remove Google Talk. My system is Windows Vista. Any suggestions? Many thanks.

    Reply

    • November 11, 2012 at 2:20 pm, David Kirk said:

      Can you just uninstall the application using the normal method instead of via command line?

      Reply

  52. November 13, 2012 at 12:52 am, ani said:

    Gud job budyy…………………….Thanks

    Reply

  53. November 26, 2012 at 7:56 pm, JT said:

    I got the list of applications using “product get name” and then copied the one I wanted to uninstall into the command “product where name=”my software” call uninstall”

    But I just get the response: No Instance(s) Available

    I copied / pasted the app name so I know there aren’t any spelling errors. Any other suggestions?

    BTW, the app name does have a registration “MYSOFTWAREr Software”. Could that be the issue?
    How do I work around that?
    I tried omitting the r and that didnt work

    Reply

  54. November 27, 2012 at 1:49 pm, kawal said:

    i could not uninstall my avg antivirus threw your post plz help me

    Reply

  55. November 29, 2012 at 4:49 pm, kamonasish said:

    ausum tip. . . .jst liked using tis technique.

    Reply

  56. December 24, 2012 at 6:25 pm, Manav Gohil said:

    Thanks 2 mr rob rogers…

    last 6 months. i can not unistalled by the antivirus of my system. and this is the best trick of the uninstalled application of the system

    Reply

  57. December 29, 2012 at 2:15 am, annoyed computer user said:

    Hi, I tried to execute the command “product get name” but nothing showed up. I initially put in the command wmic.
    Did I do something wrong?

    Reply

  58. January 07, 2013 at 9:50 am, JASh said:

    thanks

    Reply

  59. January 31, 2013 at 10:14 am, John Ferrara said:

    Thanks! If you are not admin but can run command line elevated then this works!

    Reply

  60. February 02, 2013 at 6:52 am, Spicey said:

    Thanks a lot boss….! you saved me !!!!!

    Reply

    • March 01, 2013 at 11:17 am, udaysheel said:

      > please let me know this , how using cmd prompt to uninstall an application better than using task manager!

      Reply

  61. February 02, 2013 at 8:32 am, Haare said:

    Grear Article!!

    Reply

  62. February 21, 2013 at 2:48 am, chris said:

    Just like to note that this also works for Windows 7 :) thanks

    Reply

  63. March 01, 2013 at 11:14 am, udaysheel said:

    may i know how does using command prompt benefits than going to taskmanager and uninstall a certain applications

    Reply

  64. April 02, 2013 at 9:23 am, Satyajit Mahalanabish said:

    How uninstall Nero 7….? in ran command

    Reply

  65. April 30, 2013 at 8:23 am, Sundar said:

    nice one it helped

    Reply

  66. May 06, 2013 at 5:06 am, Tarik said:

    Great tip! Thanks!
    Note: I was prompted for confirmation at the end of a long line. I only found out after it seemed to hang for a while. After scrolling horizontally to the right, I spoted the prompt, input a Y for yes, et voila!

    Reply

  67. June 12, 2013 at 5:53 am, Rana Omer said:

    It helped me ! Many thanks for the tip!

    Reply

  68. June 19, 2013 at 12:43 am, Harsha said:

    This is very helpful.. thanks a lot.

    Reply

  69. July 15, 2013 at 6:15 pm, Wp$ said:

    How do I uninstall a theme with cmd. Tried the Above but the theme wasn’t listed. Help pls. Tnx.

    Reply

  70. July 19, 2013 at 2:42 pm, Regis Hyde said:

    This only works for MSI base uninstallations. The world is more than just MSI

    Reply

  71. August 01, 2013 at 2:02 pm, sunny singhal said:

    Can we do these steps using shell script?
    Requirement: I do have a list of softwares which i might need to unistall from a windows machine frequently. So i need a script which echo’s me all the softwares i provided in code and when i choose any option it pass it as a parameter to command (product where name=”" call uninstall).

    Reply

  72. August 20, 2013 at 5:27 pm, Rhys Collyer said:

    Where the program name includes the registered trademark symbol, how do we enter this into the command window?

    Reply

  73. August 21, 2013 at 5:49 pm, garry said:

    Awesome It works Great Thanks a lot buddy

    Reply

  74. September 04, 2013 at 2:24 am, AYOUB said:

    I CANT FIND RETURN COMAND

    Reply

  75. September 23, 2013 at 9:49 am, Aakash said:

    plzz help me guyzzz

    Reply

  76. September 25, 2013 at 12:44 pm, Jake said:

    Please help! It says Auto – Invalid alias verb
    after typing in the program I am trying to uninstall and call uninstall.

    Reply

  77. October 01, 2013 at 10:12 am, liam said:

    my pc is having problems and i was advised to try this but i get the response Node – minint-48p6e96 ERROR: Description = invalid class

    I am trying to remove AVG which when it updated has caused the pc to refuse to boot to windows, the command prompt i finally managed to get to via advanced system recovery tools, The downside is I have no CD as its a netbook or way to recover as it was bought second hand. I need help badly.
    Safe mode won’t work or system repair.

    Reply

  78. October 15, 2013 at 1:21 pm, Sean McKenzie said:

    Can you combine this somehow with a wildcard? I have alot of “Microsoft office” (blank) that I wish to uninstall (ie. suite and viewers). If this could be combined with a wildcard to say “Microsoft Office *” that would be monumental.

    Reply

  79. December 16, 2013 at 12:09 pm, me said:

    Not working for Windows 7 Pro 64 bit. Error description-invalid class

    Reply

  80. January 06, 2014 at 10:16 pm, Daniel Nguyen said:

    I tried to uninstall software via command line as above guide
    this is a result:
    Method execution successful.
    Out Parameters:
    instance of __PARAMETERS
    {
    ReturnValue = 1603;
    };

    but the software still available (not uninstall).
    Any help is greatly appreciated.
    Thanks!

    Reply

  81. March 25, 2014 at 2:25 am, Olupona Samson said:

    Thanks, it’s been a wonderful tool, because some program refuse to uninstall from GUI. Thanks again

    Reply

  82. March 27, 2014 at 11:51 am, Alex said:

    When i put “product get name” , it say, “product-alias not found” .. Why it be? Any solution? I really appreciate your help..

    Reply

  83. March 28, 2014 at 3:12 am, Angel said:

    Thank you very much

    Reply

  84. April 04, 2014 at 7:00 am, Ivan said:

    to make the appllication uninstall without prompt add: /nointeractive at the end. :)

    Reply

  85. April 04, 2014 at 11:47 am, Ravi said:

    I have windows server 2003 SP2 and i am getting following error…. get – Alias not found
    ERROR:
    code = 0X80041010
    Description=Invalid class
    Facility=WMI

    Reply

Leave a Reply