How to create an MSI database?
There are several ways to do this. The most convenient one is certainly to purchase a program specially optimized for this purpose. There are manufacturers / authors who provide editors for MSI files, such as Orca, SuperOrca, InstEd. Other products are Flexera Software with the product AdminStudio, Advanced Installer from Caphyon, Wise Installer from Symantec [RIP], AKInstallerMSI from AKApplications and InstallAware from InstallAware Software Corporation. Starting with Visual Studio .NET, Microsoft offers, for example, for all programs created in Visual Studio, the possibility to create MSI databases with a tool integrated in Visual Studio.
While these can simplify the creation of software packages, they are still time-consuming and the handling itself must be learned. Some of these products are freeware, others cost money and the rest cost half a fortune. Some promise bliss, some you literally don't want to even touch with a pair of pliers.Anyone who is seriously concerned with this topic cannot avoid downloading the "Windows Installer SDK" from Microsoft, which documents the Windows Installer technology and also offers tools to help you with your work. The most important is certainly "Orca", a program for editing MSI databases. All of this is also free of charge. With the help of the Windows Installer SDK, it is even possible to create new MSI databases "from scratch", but this can be an enormous effort.
automate the Windows Installer API.
generally refers to the property of a system or model whose overall behavior cannot be described unambiguously even if one has complete information about its individual components and their interactions. Complexity is a possible form of an opposite of simplicity, determinability and manageability.
Working effectively means working in such a way that a desired result is achieved. Working efficiently means working in such a way that the result achieved and the resources used are in an optimal cost-benefit ratio and the benefits are greater than the costs (economic principle). Whereby the costs do not refer exclusively to monetary means, but to all negative consequences of the action.
are defined as processes that largely elude conscious control. Automatisms are said to be close to economics. Their "added value" is based on the savings in effort, their profit is immediately obvious: They reduce the complexity of processes and increase the "turnover" of smoothly running processes. Automatisms produce new structures - virtually behind the backs of those involved.
A programming paradigm is a fundamental programming style and differ in their concepts of static (such as objects, methods, variables, constants) and dynamic (such as assignments, control flow, data flow) program elements. There are a number of other criteria for developing software that is as bug-free and maintainable as possible - such as readability of the program code, freedom from redundancy, modularity and freedom from side effects.
Have you got 6 minutes?
Then have a look at this video. Even with VB-Script the installer API can be accessed and if you are interested you can see on the left menu bar the source code of each VBS class.
You may ask, why Visual Basic Script? Short answer: because there is currently no PowerShell cmdlet that can perform the capabilities shown in my video. Curiously, the only Powershell module available at the moment is a "read" one, which allows you to query Windows Installer products and patches installed on your system (and even that is a matter of luck KB article 974524).
The version shown is already several years old and there is also an improved version. This VBScript (I call it
SimplyCleverMSI) is a project initiated by myself that supports me in my customer related projects.
The mapping of the MSI tables and their functionality (relational database and SQL) in form of a programming language or interpreter is in reality not as complex as assumed. As obvious as it sounds; it is fundamentally up to the understanding of the technology so that automatisms can be created. Creativity makes it possible to create fascinating solutions.
How to build an Transform within an MSI (embedded Transforms)
Referenz » Embedded Transforms | Microsoft Docs
Chr(96) & "Data" & Chr(96) & " FROM _Storages"
Set objView = objDatabase.OpenView(strSQL)
'Create and Insert the row.
Set objRecord = objInstaller.CreateRecord(2)
objRecord.StringData(1) = NameOfStorage
'Insert storage - copy data into stream
objRecord.SetStream 2, PathAndNameOfMST
objView.Modify msiViewModifyAssign, objRecord
Set objView = Nothing
Embedded transformations are stored within the MSI file of the package. This guarantees users that the transformation is always available, even though the installation package is available. Primarily, embedded transforms are used in multi-tenant environments (different configurations) and / or for security-related considerations.
msiexec /i cryptovision.msi TRANSFORMS=:CFG_ENV_B
msiexec /i cryptovision.msi TRANSFORMS=:CFG_ENV_C
Embedded transformations can include property values as well as registry information, but not files. If files need to be transported, a patch (.MSP) is the better choice.