[ python-Feature Requests-1635335 ] Add registry functions to windows postinstall

SourceForge.net noreply at sourceforge.net
Wed Jan 24 21:47:52 CET 2007

Feature Requests item #1635335, was opened at 2007-01-14 21:00
Message generated for change (Comment added) made by theller
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: anatoly techtonik (techtonik)
Assigned to: Thomas Heller (theller)
Summary: Add registry functions to windows postinstall

Initial Comment:
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.


>Comment By: Thomas Heller (theller)
Date: 2007-01-24 21:47

Logged In: YES 
Originator: NO

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

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.


Comment By: Martin v. Löwis (loewis)
Date: 2007-01-20 19:07

Logged In: YES 
Originator: NO

Thomas, what do you think?


Comment By: anatoly techtonik (techtonik)
Date: 2007-01-20 15:26

Logged In: YES 
Originator: YES

Windows postinstall script is bundled with installation, launched after
installation and just before uninstall. It is described here.

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 - 


Comment By: Martin v. Löwis (loewis)
Date: 2007-01-20 11:55

Logged In: YES 
Originator: NO

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


You can respond by visiting: 

More information about the Python-bugs-list mailing list