Thus far, I have this
Code: Select all
FOR /F "skip=1 tokens=* delims==" %%A IN ('WMIC /NameSpace:"\\root\WMI" product where "Name like '%%Outlook%%'" get Name') DO set "myVar=%%A"
ECHO %myVar%
This works, if you have echo on, you will see it pull the name of whatever flavor of outlook you currently have. However immediately after this, you can see it setting the Var to blank.
Is there some way to make this script stop after finding any value? Or am I missing something obvious that causes it to wipe my variable.
Thanks in advance for any help that can be provided.