|echo ... checking for existing mounts|
%dism% /Get-MountedWimInfo | find "%install_mnt%"
if %errorlevel% equ 1 (
echo ... install.mnt not mounted.
dir %install_mnt%\*.* /b | find /v "DuMmYDaTa" >nul && set install_mnt_clean=no || set install_mnt_clean=yes
if %install_mnt_clean%==no (
echo ... *** error: data found in unmounted location.
) else (
... checking for existing mounts
( was unexpected at this time.
any idea why? it used to be working, im not sure what i did that made it this way. ive also tried variations of the statement like
if errorlevel 1 (
if %errorlevel% == 1 (