New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add registry functions to windows postinstall #44464
Comments
It would be useful to add regkey_created() or regkey_modified() to windows postinstall scripts along with directory_created() and file_created(). Useful for adding installed package to App Paths. |
Can you please elaborate? Where should these functions be defined, what should they do, and when should they be invoked (by what code)? Also, what is a "windows postinstall script"? |
Windows postinstall script is bundled with installation, launched after installation and just before uninstall. It is described here. http://docs.python.org/dist/postinstallation-script.html#SECTION005310000000000000000 Where these should be defined? I do not know - there are already some functions that are said to be "available as additional built-in functions in the installation script." on the page above. The purpose is to be able to create/delete registry keys during installation. This should also be reflected in installation log file with appropriate status code so that users could be aware of what's going on. I think the functions needed are already defined in http://docs.python.org/lib/module--winreg.html but the module is very low-level. I'd rather use Autoit like API - |
Thomas, what do you think? |
General comments: There are some problems with bdist_wininst that I assume will get worse in the future, especially with the postinstall script, because of different versions of the MS C runtime library. The installers that bdist_wininst creates are linked against a certain version which must be the same version that the Python runtime uses. If they do not match, the output of the postinstall script will not be displayed in the gui, or, in the worst case it could crash. All this *could* probably be fixed, of course, but since bdist_msi does *not* have these problems IMO bdist_msi will superseed bdist_wininst sooner or later. About the concrete problem: Originally, when bdist_wininst was first implemented, Python did not have the _winreg module, so it was not possible to create or remove registry entries in the install script or postinstall script anyway and these function would not have made any sense at all. They could probably make sense now, but it is equally possible to modify the registry in the postinstall-script at installation time, and revert these changes in the postinstall-script at uninstallation time. I would prefer not to make these changes, since a workaround is possible. |
Closing this as "won't fix", then. techtonik, if you think this is an important feature, please contribute a patch. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: