|
Answer» Hi,
I am trying to write a batch file where I NEED to access global variable.
set var="" FOR /F "tokens=1 skip=1" %%A IN ('WMIC PRODUCT WHERE "Name like "MYSOFT"" get Version') DO ( set var=%%A ) ECHO %var%
I am not able to get the version of the software out side the for loop. Can some ONE help me with this problem.
Thanks in advance.
VijayCode: [Select]@echo off set var="" FOR /F "delims=" %%A IN ('WMIC product WHERE "Name like 'Microsoft Silverlight'" get Version ^|find "."') DO ( set var=%%A ) echo %var% pauseWOOW..that works! Thanks a lot
|