代码改变世界

Introduce Windows SDKs Msi Scripts

2011-11-02 09:30  barbarossia  阅读(644)  评论(0编辑  收藏  举报

 Copyright (c) Microsoft Corporation. All rights reserved. Windows Installer utility scripts for use with Windows Scripting Host

  1. WiLstPrd.vbs - lists products, product properties, features, and components
  2. WiImport.vbs - imports files to an MSI database
  3. WiExport.vbs - exports files from an MSI database
  4. WiSubStg.vbs - adds a transform or nested MSI as a substorage
  5. WiStream.vbs - adds an external stream to a MSI package (e.g CAB file)
  6. WiMerge.vbs  - merges two MSI databases
  7. WiGenXfm.vbs - generates a transform from two databases, or compares them
  8. WiUseXfm.vbs - applies a transform to an MSI database
  9. WiLstXfm.vbs - lists an MSI transform file (CSCRIPT only)
  10. WiDiffDb.vbs - lists the differences between two databases (CSCRIPT only)  
  11. WiLstScr.vbs - lists an installer script file (CSCRIPT only)
  12. WiSumInf.vbs - displays and updates summary information stream
  13. WiPolicy.vbs - manages installer policy settings
  14. WiLangId.vbs - reports and updates the language and codepage of a package
  15. WiToAnsi.vbs - copies a Unicode text file to the same or a new Ansi text file
  16. WiFilVer.vbs - updates File table sizes and versions from source file tree
  17. WiMakCab.vbs - generates compressed file cabinets and updates package
  18. WiRunSQL.vbs - executes SQL statements against an installer database
  19. WiTextIn.vbs - copies an ANSI text file into a database string column value
  20. WiCompon.vbs - lists components and their composition in an installer database
  21. WiFeatur.vbs - lists features and their composition in an installer database
  22. WiDialog.vbs - previews all or specified dialogs in an installer database

 

All scripts display help screens describing their command line arguments,either if the first argument contains a ?, or if too few arguments are given.

Scripts return a value of 0 for success, 1 if help invoked, or 2 if failure.Windows Scripting Host is actually two hosts, use //? to obtain help:

Cscript.exe displays to standard out - useful for batch files and build scripts

Wscript.exe displays the output in a window - the default for extension .VBS

When run from a Win NT DOS box, only the base name needs to be specified, and if the tools are on the PATH, then they will be found like EXE or BAT files.

To redirect output to a file, you must use Cscript {scriptname}.VBS > {file}.

 

To download and install Windows Scripting Host (not required for Windows2000):    http://msdn.microsoft.com/scripting/windowshost/download/default.htm

To download and update Windows scripting engines:   http://msdn.microsoft.com/scripting/vbscript/download/vbsdown.htm

or  

http://www.microsoft.com/msdownload/vbscript/scripting.asp

 

The utility makecab.exe is located in the Windows Installer SDK at \Patching\makecab.exe.

 

For more information about these samples, see the section "Windows Installer Scripting Examples" in the Windows Installer help files.