Windows: Uninstall an Application from the Command Line

Posted July 23, 2008 by Rob Rogers in 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:

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.

  • 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_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall{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?

    • Tezdoll

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

      • kiran

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

        • Francis Teh

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

      • vinod

        > how to avoid restart ??

    • Ivan


  • 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

    • Fd

      just type in C:

  • Anonymous

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

    Code = 0x80041001
    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.

    • Dbritton

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

  • will

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

  • blak3r

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


  • Anonymous

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

  • Anonymous

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

  • Anonymous

    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.

  • Nag

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

  • Anonymous

    Can I create a bat file?

  • kiran

    thanks a lot

    • Love

      use again

  • Techno

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

  • Omi

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

    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!

  • Anonymous

    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.


  • Roushan

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

  • Eric

    Does this work in Windows 7?

    • Asdlfkj


  • ml

    very useful

  • Gjbedi

    Not working for WINDOWS 2003 R2

  • Gjbedi

    Not working for WINDOWS 2003 SP2

  • Nagaraju Vasamsetty


  • Marcoapdealmeida

    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?

  • Deeprothan87

    Not working

    Kuldeep Singh

  • Adham da great


  • Rudyguerrero48

    thank u very much! works very well

  • Petey

    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.

  • Anil

    How to write this in batch file

  • Anon19

    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.

  • Sonylaptopfrank


    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.

  • Madhurao1983

    How to Uninstall patch from command line

  • Dd

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

  • Andreas

    This saved me a ton of work.


  • Mahesh C

    It works great ! on my XP sp3

  • Oz

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

    • Hunter

      > Use shutdown -a after issueing the command.

  • max

    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

  • Lorrie

    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
    Code = 0x80041010
    Description = Invalid class
    Facility = WMI
    Code = 0x80040154
    Description = Class not registered
    Facility = Interface

    • Cliff Steinman

      > 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.

  • Nat

    Thank you!!!

  • Tecum Technology

    If fun and fantastic God bless

  • Raj

    It gives mee error like this

    Uninstall-Invalid alias verb

  • Prem Kumar

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

  • Charlejack


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

  • Cliff Steinman

    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.

  • Sunny

    Thanks a lot man, saved my day 🙂

  • Chris

    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?


  • raj

    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

  • Gaurav

    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

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

    • David Kirk

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

  • ani

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

  • JT

    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

  • kawal

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

  • kamonasish

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

  • Manav Gohil

    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

  • annoyed computer user

    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?

  • JASh


  • John Ferrara

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

  • Spicey

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

    • udaysheel

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

  • Haare

    Grear Article!!

  • chris

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

  • udaysheel

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

  • Satyajit Mahalanabish

    How uninstall Nero 7….? in ran command

  • Sundar

    nice one it helped

  • Tarik

    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!

  • Rana Omer

    It helped me ! Many thanks for the tip!

  • Harsha

    This is very helpful.. thanks a lot.

  • Wp$

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

  • Regis Hyde

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

  • sunny singhal

    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).

  • Rhys Collyer

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

  • garry

    Awesome It works Great Thanks a lot buddy



  • Aakash

    plzz help me guyzzz

  • Jake

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

  • liam

    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.

  • Sean McKenzie

    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.

  • me

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

  • Daniel Nguyen

    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.

  • Olupona Samson

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

  • Alex

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

  • Angel

    Thank you very much

  • Ivan

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

  • Ravi

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

  • Anand


  • john

    gave me a error at 3rd step :/, can anyone help me, i was accurately following the instructions.

  • tygrus

    wmic:rootcli>product get name
    Node – MININT-VCNOD09
    Description = Invalid class