Код:

@Echo Off
cls
Set "Ini=Z:\Box_In\file.ini"
Set "KeyWord=MainVersion"
>Nul Move /Y "%Ini%" "%Ini%.bak" &&(
>"%Ini%" (For /f "usebackq tokens=1* delims==" %%A in ("%Ini%.bak") Do (
If /I Not "%KeyWord%"=="%%A" If "%%B"=="" (Echo %%A)
If /I Not "%KeyWord%"=="%%A" If Not "%%B"=="" (Echo %%A=%%B)
If /I "%KeyWord%"=="%%A" (
For /f "tokens=1,2,3,4 delims=." %%i in ("%%B") Do (
Call Set /A LL=%%l+1
(Call Echo %%A=%%i.%%j.%%k.%%LL%%)
)
)
))
)
Pause
Естественно, при условии что MainVersion=x.x.x.x