idzs, аналогично:
Код:
@echo off
CALL:MAIN file.txt "Item01=$(ExecuteRoot)\strm\instshell.dll|IntegrEnabled"
EXIT/b
:MAIN %file_name% %uncommenting_line%
::----------------------------------
SETLOCAL DisableDelayedExpansion
(for /f "tokens=* delims=0123456789" %%a in ('type "%~1"^|findstr /n "$"') do (set "$a=%%a"
SETLOCAL EnableDelayedExpansion
if /i "!$a:~1!"==";%~2" (echo !$a:~2!) else echo(!$a:~1!
ENDLOCAL
))>"%~dpn0.tmp"
copy /y "%~dpn0.tmp" "%~1" >nul&& del "%~dpn0.tmp"
ENDLOCAL& exit /b