diff --git a/Lib/distutils/command/wininst-6.exe b/Lib/distutils/command/wininst-6.exe index 8ab173b6620..efa3bc4f1f8 100644 Binary files a/Lib/distutils/command/wininst-6.exe and b/Lib/distutils/command/wininst-6.exe differ diff --git a/Lib/distutils/command/wininst-7.1.exe b/Lib/distutils/command/wininst-7.1.exe index 858f6f2296b..7be9396b8a9 100644 Binary files a/Lib/distutils/command/wininst-7.1.exe and b/Lib/distutils/command/wininst-7.1.exe differ diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c index a715528f9ad..7ba05aaa890 100644 --- a/PC/bdist_wininst/install.c +++ b/PC/bdist_wininst/install.c @@ -1708,6 +1708,14 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) hDialog = hwnd; success = TRUE; + /* Disable the buttons while we work. Sending CANCELTOCLOSE has + the effect of disabling the cancel button, which is a) as we + do everything synchronously we can't cancel, and b) the next + step is 'finished', when it is too late to cancel anyway. + The next step being 'Finished' means we also don't need to + restore the button state back */ + PropSheet_SetWizButtons(GetParent(hwnd), 0); + SendMessage(GetParent(hwnd), PSM_CANCELTOCLOSE, 0, 0); /* Make sure the installation directory name ends in a */ /* backslash */ if (python_dir[strlen(python_dir)-1] != '\\')