I want to know the total number of index available in a install.wim file located in windows source using dism and store that number in a numeric variable in same dos batch script. So far I have tried below commands in a batch.
for /L %%A IN (1, 1, 20) Do (
PAUSE
dism /Get-WimInfo /WimFile:h:\research\Win7x64\InstallWin7_aio\sources\install.wim /index:%%A | Find "ProductType : WinNT" > H:\SCM\VERCHK.TXT
FINDSTR "ProductType : WinNT" "H:\SCM\VERCHK.TXT" > NUL
IF %ERRORLEVEL% == 0 set /A INTINDEX+=1
START H:\SCM\VERCHK.TXT
)
cls
ECHO %INTINDEX%
pause
I will like to mention that I am trying to complete the above process in my Windows 10 Pro x64.