Commands for accessing Microsoft Windows Installer
cast_msi_object MSICOMOBJ MSITYPE |
This module provides commands for accessing the Microsoft Windows Installer (MSI) component through its COM interfaces. The primary motivation for this module is that although the Installer provides a COM interface, it cannot be bound and types discovered at run time. This module provides the required type definitions for the various interfaces. These type definitions must be programmatically loaded into a MSI object instance by the application.
MSI objects are created through TWAPI's COM interface commands. The Installer object is created through the command
set msiobj [comobj WindowsInstaller.Installer]
Once an MSI object is no longer needed, it must be deleted like any other COM object.
$msiobj -destroy
Note a final call to $MSIOBJ -destroy is required for all MSI objects, not just the top-level Installer object.
Once an MSI object is created, it must be cast to the appropriate type with the command cast_msi_object before calling any methods on the object.
twapi::load_msi_prototypes $msiobj Installer
Copyright © 2007-2009 Ashok P. Nadkarni