2013-10-04 17 views

回答

2

wmic例如:

@ECHO OFF &SETLOCAL 
for /f %%a in ('wmic product where 'name like "%%Adobe Reader%%"' get version /value^|find /i "Version"') do set "%%~a" 
if defined Version (echo %Version%) else echo Adobe Reader not found! 
if "%Version%"=="11.0.04" goto:eof 
+0

你不需要逃避for/f中的单引号吗? – npocmaka

+2

@npocmaka不,它的工作。 “wmic”的语法很好奇。 :) – Endoro

相关问题