I am developing a batch file to collect websphere products information, it seems to work fine except for some cases.
For some reason under some circumstances versionInfo.bat -maintenancePackages is called but the following code (check for manageprofiles.bat), it seems like it's returning from the :check section after calling versionInfo.
My Windows batch writing skills are very rusty, other improvements are welcome.
@echo off
SetLocal EnableDelayedExpansion
set tmpfile=%TEMP%\tmpdone.txt
echo. > %tmpfile%
For /F "eol= delims=| tokens=13" %%a in (%windir%\vpd.properties) Do (
set check=%%a
call :check
)
goto eof
:check
Set skip=No
For /F "eol= delims=|" %%a in (%tmpfile%) Do (
if "%%a" == "%check%" set skip=YES
)
if %skip% == YES goto eof
echo %check%>>%tmpfile%
if exist "%check%\bin\versionInfo.bat" "%check%\bin\versionInfo.bat" -maintenancePackages
echo %check%\bin\manageprofiles.bat
if exist "%check%\bin\manageprofiles.bat" "%check%\bin\manageprofiles.bat" -listProfiles
goto eof
:del
echo Done
del %tmpfile%
:eof