I am trying to use wmic to look for an installed application.
below is an example of what i am running, however I would like to only have to search for "Adobe Reader%%", but if I am missing the % in between the works the script blows up.
wmic product where "name like "Adobe%%Reader%%" get name | findstr /v Name>>#global:KTemp#\#global:rand#-FullAppName.tmp
Hello Damian,
I am not sure if the script blows up due to Escaping.
By writing the same as you would in a DOS shell.
I get no errors.
Using Kaseya 9.2.0.16
Best Regards
For further explanation...
I originally identified the WMIC command I wanted as:
C:\>wmic product where "name like 'Adobe Reader%'" get name | findstr /v Name
However the mix of single and double quotes make Kaseya angry, so I changed everything to double quotes and it worked better. But the space in the name blows up everything.
I would like to make the above work except make "Adobe Reader" a variable
I know I tested that originally, but who know in my frantic edits I must have just over complicated and goofed it up. Thanks for the sanity check! Works here too!