When I use wmic product where "name like 'java%'" call uninstall /nointeractive it works fine and uninstalls all versions of java.
However, when I place the same command in a cmd file, when run it prints to the cmd window wmic product where "name like 'java'" call uninstall /nointeractive.
Notice the % sign is missing but nothing else is changed. Therefore only some versions of java are removed.
Any idea why this is happening?
WMIC in cmd file
Moderator: DosItHelp
Re: WMIC in cmd file
If the percent is legal syntax then in a batch file it needs to be doubled to %%
Re: WMIC in cmd file
Thank you. That solved the problem.