“Save” and “Save As” don’t do the same thing in Microsoft’s “Orca”

August 4, 2007

“Orca” is an editor for MSI files that comes with the Microsoft Windows Installer SDK.

Some program wouldn’t install on my system, claiming it can’t run on “Server” editions of Windows.
I edited the MSI file with Orca to remove the offending condition. I used File -> Save As to save the edited MSI under a different filename.

When I ran the installer again, it skipped the “Bad Windows edition” message, and instead gave me a worse error: “Error 2356”.
Digging in the SDK revealed the matching error message: “Could not locate cabinet in stream: [2].”

After a while of searching for the possible cause, I uncovered this in the Orca help, under “Special Considerations when editing Databases”:

Embedded Streams and Storages
When a database is saved using the Save As… or Save Transformed As… command, embedded binary streams (such as embedded cabinet files) are not saved to the new database unless they are part of a data row. Embedded sub-storages (nested install files) are never saved to the new database.

The solution? Make a renamed copy of the original MSI, edit with Orca, and save using File -> Save.


In debug and log messages, put the data at the end, not the middle.

May 27, 2007

In messages where a big string may be inserted, prefer “something something %s” over “something %s something”.

In this example, %s is a long hex-string representing an array’s contents.


[DECODE] [DEBUG] Was passed array ‘%s’ for processing


[DECODE] [DEBUG] Was passed array for processing: ‘%s’


[DECODE] [DEBUG] Function myDecodeFunc called with myArray = ‘%s’