Here is another way to do it with pure batch. This does write to another file but then moves it without prompting, overwriting the original with the changes.
@echo off
setlocal enabledelayedexpansion
(for /f "tokens=*" %%f in (file.cfg) do if not "%%f"=="" (
set "line=%%f"
set "line=!line:116621=224421!"
echo(!line!
)) > tmp.cfg
Move /y tmp.cfg file.cfg
And here is a way with a Hybrid VBS/Batch
@echo off
setlocal
call :FindReplace "116621" "224421" file.cfg
exit /b
:FindReplace <findstr> <replstr> <file>
set tmp="%temp%\tmp.txt"
If not exist %temp%\_.vbs call :MakeReplace
for /f "tokens=*" %%a in ('dir "%3" /s /b /a-d /on') do (
for /f "usebackq" %%b in (`Findstr /mic:"%~1" "%%a"`) do (
echo(&Echo Replacing "%~1" with "%~2" in file %%~nxa
<%%a cscript //nologo %temp%\_.vbs "%~1" "%~2">%tmp%
if exist %tmp% move /Y %tmp% "%%~dpnxa">nul
)
)
del %temp%\_.vbs
exit /b
:MakeReplace
>%temp%\_.vbs echo with Wscript
>>%temp%\_.vbs echo set args=.arguments
>>%temp%\_.vbs echo .StdOut.Write _
>>%temp%\_.vbs echo Replace(.StdIn.ReadAll,args(0),args(1),1,-1,1)
>>%temp%\_.vbs echo end with