I create my application with py2exe
and package it into an installer exe using Inno Setup on Windows 7. The installer created this way can then be installed on both Windows 7 and Windows 10 systems. When it works, the installer shows following screens in sequence:
This is the behavior I get with Inno Setup 5.5.5 or lower.
With Inno Setup 5.5.7 and higher (did not try 5.5.6), the installer is created normally and can be setup as above on Windows 7. However, the same installer fails to show screens 1 and 3 from above list during setup on Windows 10: setup directly starts with EULA screen and then jumps to confirm install location. The confirm screen doesn't even show which directory the installation will be done.
Continuing allows the installation to happen in the default location and the application works normally. Not knowing the install location is highly annoying and undesirable.
The .iss
file that I use (see below) is identical across the different Inno Setup versions that I have tried. In the file, the DefaultDirName
is set explicitly (based on the version of the application).
; WARNING: This script has been created by py2exe. Changes to this script
; will be overwritten the next time py2exe is run!
[Setup]
AppName=MyApp
AppVersion=2.0.1
AppVerName=MyApp 2.0.1
AppPublisher=Company, Inc.
AppPublisherURL=www.company.com
[email protected]
AppCopyright=Copyright (C) 2010-2016, Company, Inc.
LicenseFile=license\MyAppEULA.rtf
SetupIconFile=icons\CompanyScreeningProgram.ico
WizardImageFile=icons\MyAppImage.bmp
WizardSmallImageFile=icons\MyAppSmallImage.bmp
DefaultDirName=C:\MyApp_v2.0.1
DefaultGroupName=MyApp
Compression=lzma
OutputDir=F:\Python\dist\
OutputBaseFilename=MyApp_2.0.1_Setup
[Files]
Source: "MyApp_main.exe"; DestDir: "{app}\"; Flags: ignoreversion
Source: "lib\_bsddb.pyd"; DestDir: "{app}\lib"; Flags: ignoreversion
;.
;.
;. 600 lines of Source:
Source: "mpl-data\stylelib\grayscale.mplstyle"; DestDir: "{app}\mpl-data\stylelib"; Flags: ignoreversion
I also tried packaging the installer with Inno Setup (5.5.7 and 5.5.9) on Windows 10, but it had the same behavior.
I was wondering it I need to set additional parameters for the installer to work correctly on Windows 10 also for newer versions of Inno Setup?
Quoting revision history for Inno Setup 5.5.7:
As recommended by Microsoft's desktop applications guideline,
DisableWelcomePage
now defaults toyes
. AdditionallyDisableDirPage
andDisableProgramGroupPage
now default toauto
. The defaults in all previous versions wereno
.
Conclusion:
The Welcome page is not shown anymore by default. To enable it, set the DisableWelcomePage
:
DisableWelcomePage=no
I do not think you are right with your statement that the page shows on Windows 7.
The "Select Destination Location" page is shown for fresh installations only, not for "upgrades". So this has nothing to do with Windows 7 vs. Windows 10. The difference is probably that you have the application installed on Windows 10 system; and you do not have it installed on the Windows 7 system.
To show the page always, set the DisableDirPage
:
DisableDirPage=no
Thought as mentioned in the quote above, the defaults are recommended, so you should follow them.
I found another parameters that affects it.
CreateAppDir=no
In CreateAppDir page says:
If this is set to no, no directory for the application will be created, the Select Destination Location wizard page will not be displayed, and the {app} directory constant is equivalent to the {win} directory constant. If the uninstall feature is enabled when
CreateAppDir
is no, the uninstall data files are created in the system's Windows directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With