@pakrat2k2
DVD5 size 3.77 gb
content.png
Create the patch
bsdiff oldfile newfile patchfile (e.g. bsdiff autorun.dat autorun_edited.dat patch.bin)
Apply the patch
bspatch oldfile newfile patchfile (e.g. bspatch autorun.dat autorun_patched.dat patch.bin)
RemoveTBS (Remove trailing backslash from targetdir "INSTALLLOCATION")
Code:
dim tempInstalldir
tempInstalldir=Session.Property("INSTALLLOCATION")
if Right(tempInstalldir,1)="\" then
tempInstalldir=Left(tempInstalldir,Len(tempInstalldir)-1)
Session.Property("INSTALLLOCATION")= tempInstalldir
end if
CAFreeArc (Extract FreeArc SFX archive MOH_arc.exe (the archive contains MOH_arc.pcf) to targetdir "INSTALLLOCATION")
Code:
Set wshShell = CreateObject ("WSCript.shell")
wshShell.Popup Chr(13) & Chr(10)& "Extracting FreeArc archive contents... ",1,"Setup",0
wshshell.run Session.Property("SourceDir") & "MOH_arc.exe" & " -x -d" & chr(34) & Session.Property("INSTALLLOCATION") & chr(34) & " -y -s2" , 0, True
CAPrecomp ("Re-compressing" Precomp file to targetdir "INSTALLLOCATION" & then delete MOH_arc.pcf)
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set wshShell = CreateObject ("WSCript.shell")
wshShell.Popup Chr(13) & Chr(10)& "Re-compressing Precomp PCF file... ",1,"Setup",0
wshshell.run Session.Property("SourceDir") & "binaries\precomp038.exe" & " -r -o" & chr(34) & Session.Property("INSTALLLOCATION") & "\MOH_arc.exe" & chr(34) & " " & chr(34) & Session.Property("INSTALLLOCATION") & "\MOH_arc.pcf" & chr(34), 0, True
fso.DeleteFile Session.Property("INSTALLLOCATION") & "\MOH_arc.pcf"
CA7zip (and finally extract 7-zip SFX archive to "INSTALLLOCATION"MOHAGame\CookedPC & then delete MOH_arc.exe)
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set wshShell = CreateObject ("WSCript.shell")
wshShell.Popup Chr(13) & Chr(10)& "Extracting 7zip archive contents... ",1,"Setup",0
wshshell.run chr(34) & Session.Property("INSTALLLOCATION") & "\MOH_arc.exe" & chr(34) & " x -aoa -y -o" & chr(34) & Session.Property("INSTALLLOCATION") & "\MOHAGame\CookedPC" & chr(34), 5, True
fso.DeleteFile Session.Property("INSTALLLOCATION") & "\MOH_arc.exe"
&=
VB operator of string concatenation
chr(charcode)=
Returns the character associated with the specified ANSI character code