Update files embedded inside CAB file.

 

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 InstallPackage\MyInstaller.msi TARGETDIR="D:\Test\BASE"

 

@ECHO replace file

copy SomeFile.dll " BASE\CommonAppData\{Company Name}\{Product Name}\SomeFile.dll "

 

@ECHO Display the file information of the database.

CScript //nologo WiFilVer.vbs BASE\MyInstaller.msi

 

@ECHO Update the file size, version, and language information in the database from the source.

CScript //nologo WiFilVer.vbs BASE\MyInstaller.msi /U

 

@ECHO Recapture the CAB file with WiMakCab.vbs

CScript //nologo WiMakCab.vbs "BASE\MyInstaller.msi " data /C /U /E /S

 

DEL /Q "Data1.CAB"

DEL /Q "Data1.INF"

DEL /Q "Data1.RPT"

DEL /Q "Data1.DDF"

 

@ECHO Done

 

posted @ 2015-03-03 17:28  細水長流  阅读(194)  评论(0编辑  收藏  举报