[New-bugs-announce] [issue3621] it would be nice if installers made by bdist_wininst stored an EstimatedSize property in the Windows registry

Jason Spiro report at bugs.python.org
Wed Aug 20 18:14:10 CEST 2008

New submission from Jason Spiro <jasonspiro4 at gmail.com>:

== Summary ==

Installers made by bdist_wininst never set EstimatedSize in the Windows 
registry.  So Windows makes an estimate[1] of the installed software's 
size so the Add/Remove Programs control panel can tell users how much 
space the software is are taking up.  Windows overestimates the size: 
it estimates the size as equal to the size of the entire C:\Python 

Nowadays, disk space is cheaper than ever, so I assume it's uncommon 
for people to try to uninstall software to gain space back.  So I do 
not think it's worth fixing this bug.  Does anyone think it *is* worth 

== Steps to repro ==

You *must* be running Windows XP or higher to repro this.[2]  I used 
Python 2.5 (which I installed using the MSI installer) but I would be 
extremely surprised if this was already fixed in a newer Python's 

- Download the attached testcase.zip
- Unzip it to a temp directory
- From the temp directory, run the commands:
        setup.py bdist_wininst
        cd dist
- Click on Start Menu > Settings > Control Panel > Add/Remove Programs
- Scroll down to "Python 2.5 foo-1.0".

== Actual results ==

- The "Size" column on the right says 46.86MB (that's the size of my 
entire "C:\Python 2.5" directory.)

== Expected results ==

- The "Size" column on the right should say something close to 0.1 

== Suggested fix ==

- When creating an installer, bdist_wininst should look at the total 
size of all files to install, multiply that number by 3 (a reasonable 
estimate of the total size the .pyc and .pyo files will take up), and 
make the installer set the EstimatedSize[3] in the registry to that 

== Footnotes ==

^ [1].  See the blog entry "How does Add/Remove Programs get the size 
and other information?" by Raymond Chen at 
http://blogs.msdn.com/oldnewthing/archive/2004/07/09/178342.aspx for 
info on the algorithm Windows uses.

^ [2].  Versions of Windows older than XP never try to estimate the 
size of installed programs.

^ [3].  This is 
descriptor)\EstimatedSize and should be a DWORD representing the number 
of kilobytes the software takes up, according to 

components: Distutils
messages: 71554
nosy: jasonspiro
severity: normal
status: open
title: it would be nice if installers made by bdist_wininst stored an EstimatedSize property in the Windows registry
type: feature request

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list