References:
https://community.flexerasoftware.com/showthread.php?182791-Replace-a-single-file-embedded-in-an-MSI
Windows Installer Scripting Examples
WiFilVer.vbs : Manage File Sizes and Versions
WiMakCab.vbs: Generate File Cabinet
@ECHO administrative install msi, extract all the files to specified folder msiexec /a InstallPackageMyInstaller.msi TARGETDIR="D:TestBASE" @ECHO replace file copy SomeFile.dll " BASECommonAppData{Company Name}{Product Name}SomeFile.dll " @ECHO Display the file information of the database. CScript //nologo WiFilVer.vbs BASEMyInstaller.msi @ECHO Update the file size, version, and language information in the database from the source. CScript //nologo WiFilVer.vbs BASEMyInstaller.msi /U @ECHO Recapture the CAB file with WiMakCab.vbs CScript //nologo WiMakCab.vbs "BASEMyInstaller.msi " data /C /U /E /S DEL /Q "Data1.CAB" DEL /Q "Data1.INF" DEL /Q "Data1.RPT" DEL /Q "Data1.DDF" @ECHO Done