ValMakr – Command Line Windows Installer Automated Validation

[wpdm_package id=’956′]

ValMakr Prerequisites

Visual C++ Redistributables
evalcom2.dll (installed with Orca.msi)

Introduction

ValMakr is a tool which enables us to validate Windows Installers and Windows Installer transforms from the command line. We can use it to automate part of the Quality Assurance process during the packaging of applications.

As you probably already know, Microsoft already provide a tool called Msival2.exe which can be found here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa370504(v=vs.85).aspx

Although a nice concept, if any organisation started using this tool they would notice some limitations:

  • You cannot specify a transform (MST) file to validate
  • You can only filter out informational messages (and not errors and warnings)
  • Although you can specify ICE messages to include, you cannot specify ICE messages to omit
  • You can not do differential validation – that is, only find validation messages introduced by transforms
  • You can not validate the summary information stream of transforms

The second point above is probably just a nice-to-have, and may not ever be used to suppress showing warnings/errors.  The third point above is a useful one, since there are a few ICE messages which my current client chooses to ignore.  So rather than specifying every single ICE message apart from the ones we omit (as we would have to with Msival2.exe), we can (more efficiently) just specify the ones to omit.

We thought the lack of ability to validate a transform mentioned in the first point – especially in the modern era where most vendor’s supply their own MSI files – was a real showstopper.  ValMakr enables us to do all of this.  And a little bit more….

For example, if we chose to validate an MSI with an MST we could either do a full validation (whereby the MSI with applied MST is validated as a whole) or a differential validation (whereby we only capture the ICE messages which have been introduced by the transform).

In my current organisation we would generally do a differential validation pointing to darice.cub (since we’re generally not interested in vendor ICE messages, but only the ones which we may introduce) and then a full validation to our own custom cub file, which has been created using CubMakr. ValMakr also checks the Summary Information Stream (SIS) of transforms too, to ensure they validate against SIS rules specified in CubMakr. The following SIS entries are checked:

PID_TITLE
PID_SUBJECT
PID_AUTHOR
PID_KEYWORDS
PID_COMMENTS
PID_TEMPLATE
PID_PAGECOUNT

Here is a list of available parameters to pass (square brackets are optional, mandatory parameters are -msi, -cub and -log):

ValMakr.exe -msi <Full Path to MSI> [-mst <Full Path to MST>] [-diff] -cub <Full Path to CUB> [-ice <Colon separated list of ICE routines>] [-noice <Colon separated list of ICE routines to omit>] [-type <e/w/i>] [-log <Full Path to LOG>]

Examples:

Full validation of MSI

Full validation of MSI, omit ICE33 and ICE03

Full validation of MSI and MST

Differential validation of MSI and MST

4 thoughts on “ValMakr – Command Line Windows Installer Automated Validation

    • Hi Nick. Unfortunately not. Validation is performed on MSI and/or MST only. Although I’m not sure it’s technically possible to validate an MSP to be honest. Perhaps you could perform an admin install, then patch it, and validate that instead?

  1. I have written a CUB that will test changes in patches that we generate. Today what we use is Orca interactively where we load the base MSI, then apply a patch, then run the ICE custom actions in the CUB file against it using Tools->Validate. Both Msival2 and your tool both handle MSI’s, but I am in need of a tool that can run silently at the end of the build to verify the patch changes. I was hoping for something like passing the patch in on the cmd line 🙂 Thank you for the reply!

    • “I have written a CUB” – I hope you used CubMakr. 🙂
      Yes unfortunately ValMakr and Msival2 both use Evalcom2under the hood, and that doesn’t support opening patches I don’t think. I’d probably have to use OpenDatabase and msiOpenDatabaseModePatchFile to hack around first, and then then perform validation afterwards. But unfortunately that’s not a 5 minute job! Sorry!

Leave a Reply

Your email address will not be published. Required fields are marked *