diff --git a/base/setup/reactos/reactos.c b/base/setup/reactos/reactos.c index 4638273dea3..632c649e2d6 100644 --- a/base/setup/reactos/reactos.c +++ b/base/setup/reactos/reactos.c @@ -526,8 +526,13 @@ TypeDlgProc( /* Retrieve the current installation */ pSetupData->CurrentInstallation = (PNTOS_INSTALLATION)GetListEntryData(GetCurrentListEntry(pSetupData->NtOsInstallsList)); + InstallPartition = pSetupData->CurrentInstallation->Volume->PartEntry; + StringCchCopyW(pSetupData->USetupData.InstallationDirectory, + _countof(pSetupData->USetupData.InstallationDirectory), + pSetupData->CurrentInstallation->PathComponent); - SetWindowLongPtrW(hwndDlg, DWLP_MSGRESULT, IDD_DEVICEPAGE); + /* Jump to the Summary page during repair/upgrade */ + SetWindowLongPtrW(hwndDlg, DWLP_MSGRESULT, IDD_SUMMARYPAGE); } } else @@ -953,9 +958,15 @@ UpgradeRepairDlgProc( /* Retrieve the current installation */ pSetupData->CurrentInstallation = (PNTOS_INSTALLATION)GetListEntryData(GetCurrentListEntry(pSetupData->NtOsInstallsList)); + InstallPartition = pSetupData->CurrentInstallation->Volume->PartEntry; + StringCchCopyW(pSetupData->USetupData.InstallationDirectory, + _countof(pSetupData->USetupData.InstallationDirectory), + pSetupData->CurrentInstallation->PathComponent); /* We perform an upgrade */ pSetupData->RepairUpdateFlag = TRUE; + /* Jump to the Summary page during repair/upgrade */ + SetWindowLongPtrW(hwndDlg, DWLP_MSGRESULT, IDD_SUMMARYPAGE); return TRUE; } @@ -1062,6 +1073,13 @@ DeviceDlgProc( return TRUE; } + case PSN_WIZBACK: + { + /* Return to the Install type selection page instead of the Repair/Upgrade page */ + SetWindowLongW(hwndDlg, DWLP_MSGRESULT, IDD_TYPEPAGE); + return TRUE; + } + default: break; } @@ -1241,6 +1259,27 @@ SummaryDlgProc( return TRUE; } + case PSN_WIZBACK: + { + /* When the user performs a regular installation, go back to the previous page */ + if (!pSetupData->RepairUpdateFlag) + break; + + if (GetNumberOfListEntries(pSetupData->NtOsInstallsList) > 1) + { + /* Return to the Upgrade/Repair selection page, when the user is + * upgrading and there are more than one installation available */ + SetWindowLongPtrW(hwndDlg, DWLP_MSGRESULT, IDD_UPDATEREPAIRPAGE); + } + else + { + /* Return to the Install type selection page, when the user is + * upgrading and there is at most one installation available */ + SetWindowLongPtrW(hwndDlg, DWLP_MSGRESULT, IDD_TYPEPAGE); + } + return TRUE; + } + default: break; }