Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to uninstall a software by calling a bat file. It must be automatically, without entering any parameters during the uninstallation. How to make the bat file which would be able to uninstall software by name?

PS: I know the perfect method using WMI, but it requires user input:

WMIC
product where name="software" call uninstall
share|improve this question
1  
This is going to depend on how the program was originally installed. MSI, InstallShield, etc. – Zypher Feb 3 '10 at 7:19
up vote 5 down vote accepted

I think WMIC commands can be run from a single line which should make it easier to add to a batch file. And by adding /nointeractive then it should disable prompting as well. Try something like this:

wmic product where name="software" call uninstall /nointeractive
share|improve this answer
    
That's what I've been looking for!!! Thanks John! – alga Feb 3 '10 at 10:11

Although that may be possible for certain specific installations it's not possible to do so for all installations. As Zypher has already indicated, it will depend a great deal on the installation system used. It will also depend on whether that system allows for a "quiet" uninstall.

I really can't image a "perfect method using WMI" but congratulations if you've found one. On the other hand, you've also discovered one of the things that will get in the way of achieving your goal.

share|improve this answer

protected by Michael Hampton Oct 8 '15 at 15:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.