if not exist %systemroot%\system32\dllcache goto md51
set dllcache=%systemroot%\system32\dllcache
for %%a in (
"%systemroot%\system32\userinit.exe"
"%systemroot%\explorer.exe"
) do for /f "tokens=*" %%g in ('echo %dllcache%\%%~nxa') do (
md5 -n "%%~a">.\temp\md5chk.1
if not exist "%%~g" md5 -d123>.\temp\md5chk.2
md5 -n "%%~g">.\temp\md5chk.2
grep -iqf .\temp\md5chk.1 .\temp\md5chk.2 || (
md5 %%a %%g|sed "s/^.*$/MD5: &/"
for %%i in (%%~a %%~g) do echo %%~tzi %%~i
)
)
goto end
:md51
echo no dllcache folders.
for %%a in (
"%systemroot%\system32\userinit.exe"
"%systemroot%\explorer.exe"
) do (
md5 %%a|sed "s/^.*$/MD5: &/"
for %%i in (%%~a) do echo %%~tzi %%~i
)
if not exist %systemroot%\system32\dllcache goto md51
set dllcache=%systemroot%\system32\dllcache
for %%a in (
"%systemroot%\system32\userinit.exe"
"%systemroot%\explorer.exe"
) do for /f "tokens=*" %%g in ('echo %dllcache%\%%~nxa') do (
md5 -n "%%~a">.\temp\md5chk.1
if not exist "%%~g" (md5 -d123>.\temp\md5chk.2) else (md5 -n %~g">.\temp\md5chk.2)
grep -iqf .\temp\md5chk.1 .\temp\md5chk.2 || (
md5 %%a %%g|sed "s/^.*$/MD5: &/"
for %%i in (%%~a %%~g) do echo %%~tzi %%~i
)
)
goto end
:md51
echo no dllcache folders.
for %%a in (
"%systemroot%\system32\userinit.exe"
"%systemroot%\explorer.exe"
) do (
md5 %%a|sed "s/^.*$/MD5: &/"
for %%i in (%%~a) do echo %%~tzi %%~i
)