CREATE TABLE `Directory` ( `Directory` CHAR(72) NOT NULL, `Directory_Parent` CHAR(72), `DefaultDir` CHAR(255) NOT NULL LOCALIZABLE PRIMARY KEY `Directory` )
Where can I find the information about the datatypes used in the above create statement?
I need info on all the msi tables.
Advertisement
Answer
MSI SDK: This section in the MSI SDK lists the built-in MSI tables: https://docs.microsoft.com/en-us/windows/win32/msi/database-tables – see the Orca section below for more technical information: the file "orca.dat"
in the Orca installation folder holds the schema.
Technicalities: A few things first: The tables starting with underscore: _
such as _Validation
and _Streams
are special tables – most of which are not visible from within Orca.
The _Validation table is a system table that essentially shows the database schema. It is used during MSI database validation (recommended read). You can see the different: Database Column Data Types.
- Validation runs a series of checks on the MSI database and its content to check for common problems as well as consistency with the database schema.
- The database checks are implemented in
*.CUB files
. They can contain runnable code against the database – for example VBScript files. Open the*.CUB files
with Orca to see the content. - Validation can be invoked interactively from Orca or via the command line.
The _Streams table is a temporary table which is involved with SQL statements. Same thing with _Storages. And there are a few more such system tables.
Orca: Orca is the SDK tool for viewing and modifying MSI database files.
You can use Orca to open an MSI and select
Tables => Export Tables...
Specify an output directory and select to export all tables. You get*.idt
files with description of the content. Open in Notepad or any text editor.In the Orca installation folder there is a file called
"orca.dat"
. This is apparently the database schema for MSI files. You can use the"Export Tables"
approach for this file after you open it in Orca. Just export all tables and this should be all valid MSI tables exported to*.idt
format. There will be headers which should indicate the datatypes:
MSI SDK VBScript: Included in the SDK installed with Visual Studio you will find a number of VBScript files that show a number of techniques you can use when dealing with MSI files. The Windows Installer Scripting Examples. Look under: %ProgramFiles(x86)%Windows Kits10bin10.0.17134.0x86
– replace with the current numbers for the penultimate folder name. Quick preview of the files here.