Kae Travis

CubMakr – Simplified and Centralised Online Cub File Creation

Posted on by in CubMakr

Link to tool: CubMakr – Simplified and Centralised Online Cub File Creation

Link to video demonstration: CubMakr Video

Link to examples: CubMakr Examples

Link to V2 Updates: CubMakr V2 BETA Release

Link to video demonstration for V2: CubMakr V2 Video

When creating MSI packages we should always ensure that they conform to Windows logo standards and best practises. Adhering to these standards enables us to produce more reliable and well-authored MSI packages.

To perform this compliance check, we usually validate our MSIs using the Full MSI Validation Suite. What this validation process does is validate the MSI tables against certain rules which are specified in a .cub file called darice.cub. As a result of running this validation, we may be prompted with ICE warnings/errors which we should attempt (in most cases) to resolve.

This validation is great, but what if we need to do our own custom validation? For example, Alkane Solutions do work for multiple clients who all have different requirements:

Customer-specific values, such as Properties:
COMPANYNAME (“Customer 1”, “Customer 2” etc)
ARPNOREMOVE (Some like 1, others like 0)
REBOOT (Maybe we just want to ensure that this property exists, and that it is set correctly?)
Customer-specific logic, such as Custom Actions:
Some of our clients use Custom Actions to perform certain logic, and we must ensure that these are present in every package we deliver. 

Customer-specific naming conventions:
Some of our clients use specific naming conventions for things like the ProductName property. Some like to limit the number of periods in the ProductVersion.

In-house validation checks:
We like to check that our tables do not contain hard-coded paths, that we only append to (and not overwrite) the Path environment variable, that services use the ServiceInstall/ServiceControl tables and not the registry table, and that TNSNames.ora is not included with any package.

 

But how can we perform these validation checks when we have no scripting knowledge, and no knowledge of .cub files?

Easy – that’s where CubMakr comes in.

CubMakr is a custom toolset written using the Wix DTF (Deployment Tools Foundation) with the aim of generating custom CUB files to validate your MSI packages.  No scripting knowledge is required!!  CubMakr should be used to generate a CUB file which reflects the packaging standards that your company/client adheres to.  Using it will:

  1. Increase Accuracy of Packages
  2. Reduce Errors
  3. Improve Quality and Reliability
  4. Reduce Packaging Time

Here are a list of features:

  • Validate ANY table, and ANY column
  • Validate the Summary Information Stream
  • Multiple search comparison operators such as ‘equals’, ‘contains’, ‘starts with’ and ‘end with’
  • Search using regular expressions!
  • Perform case-sensitive searches!
  • Resolve property names at validation time
  • Display custom messages!
  • Set conditions for each validation rule!
  • Display warning, error, info or failure ICE messages!
  • Re-order the rules you create, so messages are displayed in a specific order!

and here is an example of things that can be validated for:

  • Check that certain values exist – this could be a property/value pair, a registry key, a launch condition, a custom action….or anything else contained within a Windows Installer
  • Check the format of an entry is correct – for example, check that the ProductVersion property is of the form major.minor.build
  • Check for hard-coded paths
  • Check that the case of an entry is correct – for example, check that GUIDs are upper case and check that specific public properties are upper case
  • Check that files exist/don’t exist – for example, ensure that files such as TNSNames.ora/hosts/services are not captured.
  • Check that services use the ServiceInstall/ServiceControl tables instead of the Registry table (where possible)
  • Detect if a driver installation has been captured, and warn the user that it must be configured accordingly
  • Detect for darwin descriptors
  • Detect for junk files/registry which needs excluding
  • and much, much more…

Since the first release is just a BETA (to see if people find it useful), we have not included a way of saving cub files and retrieving them at a later date.  Unfortunately whatever cubs you generate are only persistent for the current browsing session.  The long term goal would be to enable people to save cubs for each client/project.

Example rules can be found here to get you started: CubMakr Detection Examples

Hopefully somebody will find this useful.  If you do, please feel free to comment.

CubMakr – Simplified and Centralised Online Cub File Creation
CubMakr – Simplified and Centralised Online Cub File Creation

11 thoughts on “CubMakr – Simplified and Centralised Online Cub File Creation

  1. Hi All,

    Just wanted to say that I’ve checked out your CubMakr tool. It’s really great, thanks for contributing it to the online community. You’ve turned hours of work into mere minutes. I just posted an overview of the tool on my website.

    Regards,

    Rory

    • Hi Rory. Great write-up! Many thanks for this. We’ll be adding your suggestion of naming each ICE message shortly. As well as another piece of functionality that we have up our sleeve. I’ll ping you once this is live….

  2. This is really useful except that the CUB editor seems to log me out, apparently at random. It now seems to do every time I load my CUB file for editing so I can’t make any more changes

  3. Hi Kae,

    Have you abandoned this project? I can’t see the tool anywhere or does it have some pre-requisite that I’ve missed?

    Might have a use for it, otherwise i’m going to have to write my own cubs.

    Ta

    DW

  4. Hello,

    I have tried and validated my msi with created .cub file in orca but its not showing any message as written in error message box. can anyone help me on this issue.

    Thanks in advance.

  5. Hi.  You’ll have to email me your login details for CubMakr (kae.travis@alkanesolutions.co.uk) and tell me the message you’re expecting to see and why.  And I’ll try to see what the issue is.  Thanks.

Leave a Reply