mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:03:02 +00:00
- implement FormatPartition settings
- fix a few bugs in the unattend setup code svn path=/trunk/; revision=24605
This commit is contained in:
parent
2e2bcf5447
commit
f17eb0c2a1
1 changed files with 23 additions and 13 deletions
|
@ -77,6 +77,7 @@ BOOLEAN IsUnattendedSetup = FALSE;
|
||||||
LONG UnattendDestinationDiskNumber;
|
LONG UnattendDestinationDiskNumber;
|
||||||
LONG UnattendDestinationPartitionNumber;
|
LONG UnattendDestinationPartitionNumber;
|
||||||
LONG UnattendMBRInstallType = -1;
|
LONG UnattendMBRInstallType = -1;
|
||||||
|
LONG UnattendFormatPartition = 0;
|
||||||
WCHAR UnattendInstallationDirectory[MAX_PATH];
|
WCHAR UnattendInstallationDirectory[MAX_PATH];
|
||||||
|
|
||||||
/* LOCALS *******************************************************************/
|
/* LOCALS *******************************************************************/
|
||||||
|
@ -501,7 +502,7 @@ CheckUnattendedSetup(VOID)
|
||||||
SetupCloseInfFile(&UnattendInf);
|
SetupCloseInfFile(&UnattendInf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!SetupGetIntField(&Context, 0, &IntValue))
|
if (!SetupGetIntField(&Context, 1, &IntValue))
|
||||||
{
|
{
|
||||||
DPRINT("SetupGetIntField() failed for key 'DestinationDiskNumber'\n");
|
DPRINT("SetupGetIntField() failed for key 'DestinationDiskNumber'\n");
|
||||||
SetupCloseInfFile(&UnattendInf);
|
SetupCloseInfFile(&UnattendInf);
|
||||||
|
@ -516,7 +517,7 @@ CheckUnattendedSetup(VOID)
|
||||||
SetupCloseInfFile(UnattendInf);
|
SetupCloseInfFile(UnattendInf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!SetupGetIntField(&Context, 0, &IntValue))
|
if (!SetupGetIntField(&Context, 1, &IntValue))
|
||||||
{
|
{
|
||||||
DPRINT("SetupGetIntField() failed for key 'DestinationPartitionNumber'\n");
|
DPRINT("SetupGetIntField() failed for key 'DestinationPartitionNumber'\n");
|
||||||
SetupCloseInfFile(UnattendInf);
|
SetupCloseInfFile(UnattendInf);
|
||||||
|
@ -544,19 +545,21 @@ CheckUnattendedSetup(VOID)
|
||||||
IsUnattendedSetup = TRUE;
|
IsUnattendedSetup = TRUE;
|
||||||
|
|
||||||
/* Search for 'MBRInstallType' in the 'Unattend' section */
|
/* Search for 'MBRInstallType' in the 'Unattend' section */
|
||||||
if (!SetupFindFirstLineW(UnattendInf, L"Unattend", L"MBRInstallType", &Context))
|
if (SetupFindFirstLineW(UnattendInf, L"Unattend", L"MBRInstallType", &Context))
|
||||||
{
|
{
|
||||||
DPRINT("SetupFindFirstLine() failed for key 'MBRInstallType'\n");
|
if (SetupGetIntField(&Context, 1, &IntValue))
|
||||||
SetupCloseInfFile(UnattendInf);
|
{
|
||||||
return;
|
UnattendMBRInstallType = IntValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!SetupGetIntField(&Context, 0, &IntValue))
|
/* Search for 'FormatPartition' in the 'Unattend' section */
|
||||||
|
if (!SetupFindFirstLineW(UnattendInf, L"Unattend", L"FormatPartition", &Context))
|
||||||
{
|
{
|
||||||
DPRINT("SetupGetIntField() failed for key 'MBRInstallType'\n");
|
if (SetupGetIntField(&Context, 1, &IntValue))
|
||||||
SetupCloseInfFile(UnattendInf);
|
{
|
||||||
return;
|
UnattendFormatPartition = IntValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UnattendMBRInstallType = IntValue;
|
|
||||||
|
|
||||||
SetupCloseInfFile(UnattendInf);
|
SetupCloseInfFile(UnattendInf);
|
||||||
|
|
||||||
|
@ -2133,6 +2136,10 @@ SelectFileSystemPage (PINPUT_RECORD Ir)
|
||||||
|
|
||||||
if (IsUnattendedSetup)
|
if (IsUnattendedSetup)
|
||||||
{
|
{
|
||||||
|
if (UnattendFormatPartition)
|
||||||
|
{
|
||||||
|
return FORMAT_PARTITION_PAGE;
|
||||||
|
}
|
||||||
return(CHECK_FILE_SYSTEM_PAGE);
|
return(CHECK_FILE_SYSTEM_PAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2216,7 +2223,10 @@ FormatPartitionPage (PINPUT_RECORD Ir)
|
||||||
|
|
||||||
while(TRUE)
|
while(TRUE)
|
||||||
{
|
{
|
||||||
CONSOLE_ConInKey(Ir);
|
if (!IsUnattendedSetup)
|
||||||
|
{
|
||||||
|
CONSOLE_ConInKey(Ir);
|
||||||
|
}
|
||||||
|
|
||||||
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
|
||||||
|
@ -2227,7 +2237,7 @@ FormatPartitionPage (PINPUT_RECORD Ir)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN) /* ENTER */
|
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN || IsUnattendedSetup) /* ENTER */
|
||||||
{
|
{
|
||||||
CONSOLE_SetStatusText (" Please wait ...");
|
CONSOLE_SetStatusText (" Please wait ...");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue