Trying to pipe to output of this:
Code: Select all
wmic datafile where name='C:\\Program Files (x86)\\Citrix\\ICA Client\\pnagent.exe' get version
into a variable to run against if statements.
Have tried piping to a temporary text file to then read back in but output is unexpected.
Have tried many variations of
Code: Select all
for /f %%i in ('wmic datafile where name='C:\\Program Files (x86)\\Citrix\\ICA Client\\pnagent.exe') do set _CmdResult=%%i
But get varying results of "%%I was unexpected" and other errors
What am I missing here, is there a simpler way?