View Single Post
  #8  
Old Today, 02:16
bird2026 bird2026 is offline
Registered User
 
Join Date: Jun 2026
Location: Türkiye
Posts: 17
Thanks: 1
Thanked 5 Times in 2 Posts
bird2026 is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
That's because the Setup.exe has no [CMDCommand] executed after install process.

Code:
[CMDCommands]
@ECHO OFF
SETLOCAL EnableDelayedExpansion EnableExtensions
IF NOT EXIST "{app}\mgstpp_wwise.xtl" GOTO End
CD /D "{app}"
IF EXIST "{app}\wem-unpacker.exe" CALL "{app}\wem-unpacker.exe" "{app}"
"{app}\XTool.exe" decode "{app}\mgstpp_wwise.xtl" "{app}\wwise.tar_extract" "{app}\wwise.tar"
"{app}\7z.exe" x -aoa "{app}\wwise.tar" -o"{app}"
TITLE Repack files, please wait...
SET /A "FileList.Count=2"
SET "FileList[1].Name=00"
SET "FileList[2].Name=01"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\master\0\!FileList[%%i].Name!.inf" (
	CALL "{app}\MGSV_QAR_Tool.exe" "{app}\master\0\!FileList[%%i].Name!.inf" -r
	RD /S /Q "{app}\master\0\!FileList[%%i].Name!"
	DEL /F /S /Q "{app}\master\0\!FileList[%%i].Name!.inf"
	REN "{app}\master\0\!FileList[%%i].Name!.dat" "!FileList[%%i].Name!.tmp"
)
SET /A "FileList.Count=2"
SET "FileList[1].Name=00"
SET "FileList[2].Name=01"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.inf" (
	CALL "{app}\MGSV_QAR_Tool.exe" "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.inf" -r
	RD /S /Q "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!"
	DEL /F /S /Q "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.inf"
	REN "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.dat" "!FileList[%%i].Name!.tmp"
)
SET /A "FileList.Count=11"
SET "FileList[1].Name=chunk0"
SET "FileList[2].Name=chunk1"
SET "FileList[3].Name=chunk2"
SET "FileList[4].Name=chunk3"
SET "FileList[5].Name=chunk4"
SET "FileList[6].Name=data1"
SET "FileList[7].Name=texture0"
SET "FileList[8].Name=texture1"
SET "FileList[9].Name=texture2"
SET "FileList[10].Name=texture3"
SET "FileList[11].Name=texture4"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\master\!FileList[%%i].Name!.inf" (
	CALL "{app}\MGSV_QAR_Tool.exe" "{app}\master\!FileList[%%i].Name!.inf" -r
	RD /S /Q "{app}\master\!FileList[%%i].Name!"
	DEL /F /S /Q "{app}\master\!FileList[%%i].Name!.inf"
	REN "{app}\master\!FileList[%%i].Name!.dat" "!FileList[%%i].Name!.tmp"
)
SET /A "FileList.Count=2"
SET "FileList[1].Name=chunk0"
SET "FileList[2].Name=texture0"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\mgo\!FileList[%%i].Name!.inf" (
	CALL "{app}\MGSV_QAR_Tool.exe" "{app}\mgo\!FileList[%%i].Name!.inf" -r
	RD /S /Q "{app}\mgo\!FileList[%%i].Name!"
	DEL /F /S /Q "{app}\mgo\!FileList[%%i].Name!.inf"
	REN "{app}\mgo\!FileList[%%i].Name!.dat" "!FileList[%%i].Name!.tmp"
)
TITLE Applying patch files, please wait...
SET /A "FileList.Count=2"
SET "FileList[1].Name=00"
SET "FileList[2].Name=01"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\master\0\!FileList[%%i].Name!.tmp" (
	CALL "{app}\xdelta3.exe" -d -s "{app}\master\0\!FileList[%%i].Name!.tmp" "{app}\master\0\!FileList[%%i].Name!.dat.diff" "{app}\master\0\!FileList[%%i].Name!.dat"
	DEL /F /S /Q "{app}\master\0\!FileList[%%i].Name!.tmp"
	DEL /F /S /Q "{app}\master\0\!FileList[%%i].Name!.dat.diff"
)
SET /A "FileList.Count=2"
SET "FileList[1].Name=00"
SET "FileList[2].Name=01"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.tmp" (
	CALL "{app}\xdelta3.exe" -d -s "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.tmp" "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.dat.diff" "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.dat"
	DEL /F /S /Q "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.tmp"
	DEL /F /S /Q "{app}\master\1\MGSVTUPDATEV0110\0\!FileList[%%i].Name!.dat.diff"
)
SET /A "FileList.Count=11"
SET "FileList[1].Name=chunk0"
SET "FileList[2].Name=chunk1"
SET "FileList[3].Name=chunk2"
SET "FileList[4].Name=chunk3"
SET "FileList[5].Name=chunk4"
SET "FileList[6].Name=data1"
SET "FileList[7].Name=texture0"
SET "FileList[8].Name=texture1"
SET "FileList[9].Name=texture2"
SET "FileList[10].Name=texture3"
SET "FileList[11].Name=texture4"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\master\!FileList[%%i].Name!.tmp" (
	CALL "{app}\xdelta3.exe" -d -s "{app}\master\!FileList[%%i].Name!.tmp" "{app}\master\!FileList[%%i].Name!.dat.diff" "{app}\master\!FileList[%%i].Name!.dat"
	DEL /F /S /Q "{app}\master\!FileList[%%i].Name!.tmp"
	DEL /F /S /Q "{app}\master\!FileList[%%i].Name!.dat.diff"
)
SET /A "FileList.Count=2"
SET "FileList[1].Name=chunk0"
SET "FileList[2].Name=texture0"
FOR /L %%i IN (1, 1, !FileList.Count!) DO IF EXIST "{app}\mgo\!FileList[%%i].Name!.tmp" (
	CALL "{app}\xdelta3.exe" -d -s "{app}\mgo\!FileList[%%i].Name!.tmp" "{app}\mgo\!FileList[%%i].Name!.dat.diff" "{app}\mgo\!FileList[%%i].Name!.dat"
	DEL /F /S /Q "{app}\mgo\!FileList[%%i].Name!.tmp"
	DEL /F /S /Q "{app}\mgo\!FileList[%%i].Name!.dat.diff"
)
DEL /F /S /Q "{app}\wem-unpacker.exe"
DEL /F /S /Q "{app}\XTool.exe"
DEL /F /S /Q "{app}\mgstpp_wwise.xtl"
DEL /F /S /Q "{app}\7z.exe"
DEL /F /S /Q "{app}\MGSV_QAR_Tool.exe"
DEL /F /S /Q "{app}\zlib1.dll"
DEL /F /S /Q "{app}\dictionary.txt"
DEL /F /S /Q "{app}\xdelta3.exe"
DEL /F /S /Q "{app}\wwise.tar"
RD /S /Q "{app}\wwise.tar_extract"
TIMEOUT 3
:End
ENDLOCAL
DEL "%~f0"
You can also use this manually, just save it in game folder as batch file and remove
Code:
"{app}\"
from the code inside the batch file.

PS: And don't delete the backup folder until everything is done. Check game files after compressing and installation. If they match the checksum then you should delete the backup folder. There is a reason I made it this way.
This game uses encryption on the game files that's why they has to be extracted first, otherwise ratio is bad.
Hello KaktoR, I apologize for disturbing you again. If it’s not too much trouble, could you provide a video tutorial example? I’m having trouble understanding what to do. I apologize again and thank you for your help, KaktoR.
Reply With Quote