Wildcards in a WMIC uninstall command

已答覆 Wildcards in a WMIC uninstall command

  • Wednesday, February 27, 2013 6:50 PM
     
     

    I am trying to use WMIC.exe to uninstall the 64-bit version of java. I use the command wmic product where "name like '%%Java 7%%'" call uninstall and it does what i need for the most part.  My question is how can I have it search for Java 7 Update 15 (64-bit) with the 15 being a wildcard?  I am trying to just uninstall the 64 bit version and not the 32 bit version.  I cannot seem to figure out a way to write this.  Any suggestions?


    Matt Dillon

All Replies

  • Wednesday, February 27, 2013 7:27 PM
     
     Answered

    To answer my own question - 

    wmic product where "name like '%%Java%%7 Update%% (64-bit)%%'" call uninstall


    Matt Dillon

  • Wednesday, February 27, 2013 8:03 PM
     
     

    Also, you can use underscore _ which counts as one random character


    Best Regards
    Claus Codam
    Consultant, Developer
    Coretech - Blog