I used bdist_msi
from cx_freeze in the past and it works nice.
Now I need to create registry entries
Is it possible to create registry entries w
To which purpose do you need to create registry entries?
The cx_Freeze documentation is not complete: the bdist_msi
command has more options than the currently listed ones add_to_path
and upgrade_code
. It has an option (kwarg) data
(see the source code of cx_Freeze) which can be used to add entries to the Windows Installer database tables. See here how to let the installer create desktop or program menu shortcuts by adding entries to the Shortcut Table (key Shortcut
of data
) and to the Directory Table (key Directory
). Similarly, you can use the key Registry
to add information to the Registry Table and the key RemoveRegistry
to add information to the RemoveRegistry Table, telling the installer to write information to the registry upon installing and to remove it upon uninstalling.
You can use Orca to see which entries the wixtools generate in the Registry Table and Component Table (and maybe further tables) with your settings and define exactly the same tables in your setup script and pass them to bdist_msi
using data
.
You can also add Properties through the Property Table (key Property
), an User Interface through the InstallUISequence Table, Dialog Table, Control Table, and ControlEvent Table, and much more... See here for a list of the available keys with links to the documentation of the corresponding database tables.
For more complex purposes, you probably need to use additional tools to generate an installer after running the cx_Freeze setup script. See for example the script-based tool NSIS (Nullsoft Scriptable Install System) .