Windows Installer PowerShell Module 2.2.1 Released



Yesterday I released servicing update 2.2.1, which updates 2.2.0 to fix a few bugs and add a few cool new features:

  • You can define the [string] $MsiAttributeColumnFormat variable to dictate how attribute columns should appear. The values you can pass are the same as the enumeration format strings, except that “G” displays the culture-invariant decimal value you would see in version 2.2.0 or even in Orca. Changing the display format does not change the underlying value, so bitwise operators like -band still work.
  • Can’t remember the standard attribute column enumeration values? I’ve been working with Windows Installer for about 14 years and only remember a couple myself. But now it’s a little easier to do by adding another property adapter to standard attribute columns that provide attribute properties in the form:”Has” + <attribute enumeration name> (e.g. Component.Attributes.HasRegistryKeyPath). This is also great if you don’t really get bitwise operators. See this example for more detail.
  • While really a bug fix, I wanted to call out specifically that registry paths should be mapped correctly to PSPath properties whether running under 32- or 64-bit PowerShell. This was a fun problem and I invite you to look at the source code for the RegistryView class if you’re interested.

Version-specific documentation has been added, but the most significant change to the documentation is the complete overhaul of the examples. Apart from removing some old examples using deprecated functionality, I organized the examples into different subsections (on separate pages) based on what sort of actions you’d like to perform. You can suggest any other examples you would like to see – or any other questions or comments – on the discussion tab.

Heath Stewart

Senior Software Engineer

Follow Heath   

No Comments.