Skip to content
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

Closed
techtonik mannequin opened this issue Jan 14, 2007 · 6 comments
Closed

Add registry functions to windows postinstall #44464

techtonik mannequin opened this issue Jan 14, 2007 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@techtonik
Copy link
Mannequin

techtonik mannequin commented Jan 14, 2007

BPO 1635335
Nosy @loewis, @theller

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:

assignee = 'https://github.com/theller'
closed_at = <Date 2007-01-24.21:48:31.000>
created_at = <Date 2007-01-14.20:00:49.000>
labels = ['type-feature', 'library']
title = 'Add registry functions to windows postinstall'
updated_at = <Date 2007-01-24.21:48:31.000>
user = 'https://bugs.python.org/techtonik'

bugs.python.org fields:

activity = <Date 2007-01-24.21:48:31.000>
actor = 'loewis'
assignee = 'theller'
closed = True
closed_date = None
closer = None
components = ['Distutils']
creation = <Date 2007-01-14.20:00:49.000>
creator = 'techtonik'
dependencies = []
files = []
hgrepos = []
issue_num = 1635335
keywords = []
message_count = 6.0
messages = ['54980', '54981', '54982', '54983', '54984', '54985']
nosy_count = 3.0
nosy_names = ['loewis', 'theller', 'techtonik']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1635335'
versions = []

@techtonik
Copy link
Mannequin Author

techtonik mannequin commented Jan 14, 2007

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.

@techtonik techtonik mannequin closed this as completed Jan 14, 2007
@techtonik techtonik mannequin assigned theller Jan 14, 2007
@techtonik techtonik mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jan 14, 2007
@loewis
Copy link
Mannequin

loewis mannequin commented Jan 20, 2007

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"?

@techtonik
Copy link
Mannequin Author

techtonik mannequin commented Jan 20, 2007

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 -
http://www.autoitscript.com/autoit3/docs/functions/RegRead.htm
http://www.autoitscript.com/autoit3/docs/functions/RegWrite.htm
http://www.autoitscript.com/autoit3/docs/functions/RegDelete.htm

@loewis
Copy link
Mannequin

loewis mannequin commented Jan 20, 2007

Thomas, what do you think?

@theller
Copy link

theller commented Jan 24, 2007

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.
The second problem is that bdist_wininst will not work with 64-bit Pythons.

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.

@loewis
Copy link
Mannequin

loewis mannequin commented Jan 24, 2007

Closing this as "won't fix", then. techtonik, if you think this is an important feature, please contribute a patch.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant