In a batch script file, escape your %
s by prefacing each with another %
as follows:
wmic /node:"hostname" product where "Name like '%%Office Outlook%%'" get Name
For proof, try next in your batch file:
echo ON
wmic /node:"hostname" product where "Name like '%%Office Outlook%%'" get Name
pause
You should see next ECHO
ed command, the same as it would be typed from command prompt:
wmic /node:"hostname" product where "Name like '%Office Outlook%'" get Name
:::::::::::::::::::::::::::::
::: some wmic output here :::
:::::::::::::::::::::::::::::
Press any key to continue . . .
For explanation, read Syntax : Escape Characters, Delimiters and Quotes
Escaping Percents
The % character has a special meaning for command line parameters and
FOR parameters.
To treat a percent in a batch script file as a
regular character, double it: %%
Read How does the Windows Command Interpreter (CMD.EXE) parse scripts? (entire thread) as well.