mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-12-23 08:56:02 +01:00
bd36a85bff
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
18 lines
829 B
JavaScript
18 lines
829 B
JavaScript
if (WScript.Arguments.Length != 3) {
|
|
WScript.echo("// MsiDiff.js");
|
|
WScript.echo("// Usage: MsiDiff.js base.msi target.msi diff.mst");
|
|
WScript.quit(0);
|
|
}
|
|
try {
|
|
var installerObj = new ActiveXObject("WindowsInstaller.Installer");
|
|
var baseDatabase = installerObj.OpenDatabase(WScript.Arguments.Item(0), 0);
|
|
var targetDatabase = installerObj.OpenDatabase(WScript.Arguments.Item(1), 0);
|
|
|
|
targetDatabase.GenerateTransform(baseDatabase, WScript.Arguments.Item(2));
|
|
targetDatabase.CreateTransformSummaryInfo(baseDatabase, WScript.Arguments.Item(2), 0, 0);
|
|
} catch (ex) {
|
|
try { // for cscript.exe only; not for wscript.exe
|
|
WScript.StdErr.WriteLine("Error : " + ex.number + " : " + ex.description);
|
|
} catch (ex2) { /* exception on wscript.exe; keep quiet to avoid pop up error dialogs */ }
|
|
}
|