How to: Uninstalling Application via DOS Command Line

Previously we were discussing the method of deleting programs with command prompt. Let's take a look today, how we can clean uninstall programs with command prompt. This method is not as robust as cmd deletion, but it comes very useful when for some reason program we want to uninstall does not provide it's own uninstaller. Either because programmers are a bit lazy or they simply do not want you to uninstall their product. But they will not trick you with their methods as we are not such beginners right!

cmd uninstall
As an example I picked up DesktopEarth for my purpose. Here is how I did it.
Open cmd and type wmic as shown on the picture. Now type this: product where name="DesktopEarth" uninstall. Press enter and you will see dialog asking you to confirm action. Type in Y and press enter. Wait a little and see the results. To uninstall any other program simply replace the name.


Share/Save/Bookmark

21 Comments:

anshul on April 29, 2009 3:42 AM said...

submited and shared your post to digg

Thomas on April 29, 2009 4:21 AM said...

@anshul
thank you.

medjam8 on May 2, 2009 1:52 PM said...

I didn't know you can do this and things like this in CMD... I read a lot of posts from different sites and there are a lot of things you can do.
BTW nice site =)

Thomas on May 3, 2009 1:44 AM said...

@medjam8
Thanx for compliments and welcome here.
Yeah you can do just about everything in cmd. Before GUI was born everything was done in cmd. I will probably write more about cmd tricks. I think they are useful for troubleshooting.

Anonymous said...

i am new to this stuff and i need more details... kould somebody tell me exactly what to type in to do this? i hope i don't need to know file location...

Tomaz on July 9, 2009 12:07 PM said...

You have to type this: product where name="DesktopEarth" uninstall. Replace DesktopEarth with the program you want to uninstall. Read the post more carefully. All instructions are written.

pcterritory

Anonymous said...

ERROR:
Code = 0x80041001
Description = Generic failure
Facility = WMI

What am I doing wrong?

pcterritory said...

What program are you trying to uninstall and where is this program installed (on system partition or else).

Generally this error occurs on some rare computers where nothing actually is wrong but for some unknown reason dos uninstaller does not work.

Anonymous said...

Guys, i have tried the command,but error massege was 'No Instance(s) found'. Pls, where have i missed it?

Tomaz on April 4, 2010 11:45 AM said...

Try to type in correct name for the program you are uninstalling. Wrongly typed name might be the reason for this. I have had the same problem recently. If it does not help, try to delete the program via command prompt. Check it here:
http://www.pcterritory.net/2009/04/uninstall-and-delete-program-with.html

Anonymous said...

i have install two antiviruses ,now my computer is frizing.they both don't want to be deleted from the computer.

swapnil said...

I am working on automation and want to uninstall a program without dialog asking you to confirm action. I tried 'call' function help but in vain :(. Can you please help me to uninstall a program without dialog asking you to confirm action?

Anonymous said...

Hi, I also tried the command, but an error message occurred stating "method execution successful. Out parameters: instance of _parameters {returnvalue = 1601;};"

What could have possibly caused this? The program was not uninstalled successfully. Thanks!

Help is greatly appreciated!

Anonymous said...

Thank you very much sir, you have helped greatly in covering my ass. Props.

Anonymous said...

i got a message like "alias not found"...what can i do?
thanks very much

Tomaz on August 8, 2010 12:53 PM said...

I suppose you entered the wrong name of a program which you ware trying to uninstall.

But on the other hand I must tell I experienced similar issues with Windows. There might be several reasons and one of those is that the uninstaller of particular program is corrupted. Try to delete via cmd. I wrote a while back about it here:
http://www.pcterritory.net/2009/04/uninstall-and-delete-program-with.html

jsnazzi said...

My computer is stuck in the continuous loop of installing updates 3 of 3 0%. I want to do a system restore, but my disk is too full to do a system restore. I need to free up some disk space in order to do a system restore by uninstalling Microsoft Office 2007 from the dos prompt. What are the exact commands to type? I am not very knowledgeable of dos commands or computers in general. I am running Vista. I tried to do the above method, but it doesn't work. I don't know the exact name to type for Microsoft Office 2007.

Tomaz on August 27, 2010 12:28 AM said...

Try this jsnazzi.

Open Command prompt.
Type WMIC and press enter.
Now type: product get name and press enter again.
Now you should see all the installed software on your computer. To uninstall any of the software (namely Microsoft Office) type in this command: product where name="TYPE IN EXACT MSOFFICE NAME FROM THE LIST" call uninstall and again press enter.
You will be asked whether you want to uninstall it. Press Y. That is it.

I hope this works for your Vista in boot with command prompt environment. Otherwise, boot computer in safemode and try to uninstall MSOffice from there. If it does not help, try to delete some of your pictures and movies from SafeMode.
Anyway I doubt your computer cannot update because it lacks space. It would probably warn you before starting update that you are running out of space.

Anyway good luck.

Anonymous said...

hi...
i tried all you said, but it just takes a few seconds, then moves to the next command line without really showing anything done. What did i do wrong?

Anonymous said...

I keep on getting this error:
Node-MINWINPC
Error:
Code=0x80041017
Description = Invalid query
Facility = WMI
Error:
Code=0x80041017
Description: Class not registered
Facility = Interface

Anonymous said...

It seems working but the response is execution succesful but out of parameters returnvalue=1603

Post a Comment

 

Copyright © pcterritory.net 2009 - 2010