From MSI to WiX, Part 11 - Windows Installer Automation Interface, Part 1

The main page for the series is here.



This post starts a series on Windows Installer Object Model.  We will explore how and when to use automation interface objects, properties, and functions.

Roughly, we have three main groups:

  • Getting information about installed products
  • Updating installed products
  • Making changes in the MSI database during installation

There also few methods to deal with advertising and few helper methods (getting value of environment variable or registry, few file related functions).

The following table shows in which version of MSI objects and methods/properties were introduced:

Object Property/Method 2.0 3.0 3.1 4.0 4.5
Installer AddSource X        
  AdvertiseProduct       X  
  AdvertiseScript       X  
  ApplyPatch   X      
  ApplyMultiplePatches   X      
  ClearSourceList X        
  CollectUserInfo X        
  ComponentClients X        
  ComponentPath X        
  ComponentQualifiers X        
  Components X        
  ConfigureFeature X        
  ConfigureProduct X        
  CreateAdvertiseScript       X  
  CreateRecord X        
  EnableLog X        
  Environment X        
  ExtractPatchXMLData   X      
  FeatureParent X        
  Features X        
  FeatureState X        
  FeatureUsageCount X        
  FeatureUsageDate X        
  FileAttributes X        
  FileHash X        
  FileSignatureInfo X        
  FileSize X        
  FileVersion X        
  ForceSourceListResolution X        
  InstallProduct X        
  LastErrorRecord X        
  OpenPackage X        
  OpenDatabase X        
  OpenProduct X        
  Patches X        
  PatchesEx   X      
  PatchFiles       X  
  PatchInfo X        
  PatchTransforms X        
  ProductInfo   X      
  ProductInfoFromScript       X  
  ProductElevated       X  
  ProductsEx   X      
  Products X        
  ProductState X        
  ProvideAssembly       X  
  ProvideComponent X        
  ProvideQualifiedComponent X        
  QualifierDescription X        
  RegistryValue X        
  ReinstallFeature X        
  ReinstallProduct X        
  RelatedProducts X        
  RemovePatches   X      
  ShortcutTarget X        
  SummaryInformation X        
  UILevel X        
  UseFeature X        
  Version X        
Product SourceListAddMediaDisk   X      
  SourceListAddSource   X      
  SourceListClearSource   X      
  SourceListClearAll   X      
  SourceListClearMediaDisk   X      
  SourceListForceResolution   X      
  SourceListInfo   X      
  ComponentState   X      
  ProductCode   X      
  InstallProperty   X      
  Context   X      
  FeatureState   X      
  MediaDisks   X      
  Sources   X      
  State   X      
  UserSid   X      
FeatureInfo Attributes X        
  Description X        
  Title X        
Patch SourceListAddMediaDisk   X      
  SourceListAddSource   X      
  SourceListClearSource   X      
  SourceListClearAll   X      
  SourceListClearMediaDisk   X      
  SourceListForceResolution   X      
  Context   X      
  MediaDisks   X      
  PatchCode   X      
  PatchProperty   X      
  ProductCode   X      
  SourceListInfo   X      
  Sources   X      
  State   X      
  UserSid   X      
Database ApplyTransform X        
  Commit X        
  CreateTransformSummaryInfo X        
  DatabaseState X        
  EnableUIPreview X        
  Export X        
  GenerateTransform X        
  Import X        
  Merge X        
  OpenView X        
  PrimaryKeys X        
  SummaryInformation X        
  TablePersistent X        
Session ComponentCosts X        
  ComponentCurrentState X        
  ComponentRequestState X        
  Database X        
  DoAction X        
  EvaluateCondition X        
  FeatureCost X        
  FeatureCurrentState X        
  FeatureInfo X        
  FeatureRequestState X        
  FeatureValidStates X        
  FormatRecord X        
  Installer X        
  Language X        
  Message X        
  Mode X        
  ProductProperty X        
  Property X        
  Sequence X        
  SetInstallLevel X        
  SourcePath X        
  TargetPath X        
  VerifyDiskSpace X        
SummaryInfo Persist X        
  Property X        
  PropertyCount X        
View Close X        
  ColumnInfo X        
  Execute X        
  Fetch X        
  GetError X        
  Modify X        
UIPreview Property X        
  ViewBillboard X        
  ViewDialog X        
Record ClearData X        
  DataSize X        
  FieldCount X        
  FormatText X        
  IntegerData X        
  IsNull X        
  ReadStream X        
  StringData X        
RecordList Count X        
  Item X        
StringList Count X        
  Item X