cx_freeze bdist_msi: create registry entries?

后端 未结 3 963
挽巷
挽巷 2021-01-18 23:57

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

3条回答
  •  不知归路
    2021-01-19 00:37

    I am answering my own question. I think this solution should work:

    First use bdist_msi to create the msi-file.

    Then alter the created msi file. You could use the python library msilib. Add an entry to the table Registry, documented here: https://docs.microsoft.com/en-us/windows/desktop/msi/registry-table

    I could not use the undocumented "data" argument of cx_freeze since in setup.py, since it uses msilib.add_data() . And this methods needs the external key to a component.

    I don't know this component-id during setup.py.

    That's why I think you need to do this in two steps.

    Above is only theory. In practice I used bdist_exe and then wix to create the msi.

    Since above is only vague guessing, feedback is very welcome.

提交回复
热议问题