Author: spetreolle
Date: Mon Feb 27 16:37:48 2012
New Revision: 55884
URL:
http://svn.reactos.org/svn/reactos?rev=55884&view=rev
Log:
[USETUP]
Fix installation directories set into unattend.inf,
they were ignored and installed always into \ReactOS.
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Mon Feb 27 16:37:48
2012
@@ -506,10 +506,10 @@
UnattendDestinationPartitionNumber = IntValue;
- /* Search for 'DestinationPartitionNumber' in the 'Unattend' section
*/
- if (!SetupFindFirstLineW(UnattendInf, L"Unattend",
L"DestinationPartitionNumber", &Context))
- {
- DPRINT("SetupFindFirstLine() failed for key
'DestinationPartitionNumber'\n");
+ /* Search for 'InstallationDirectory' in the 'Unattend' section */
+ if (!SetupFindFirstLineW(UnattendInf, L"Unattend",
L"InstallationDirectory", &Context))
+ {
+ DPRINT("SetupFindFirstLine() failed for key
'InstallationDirectory'\n");
SetupCloseInfFile(UnattendInf);
return;
}
@@ -2594,8 +2594,6 @@
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
WCHAR InstallDir[51];
- PWCHAR DefaultPath;
- INFCONTEXT Context;
ULONG Length;
if (PartitionList == NULL ||
@@ -2609,22 +2607,10 @@
DiskEntry = PartitionList->CurrentDisk;
PartEntry = PartitionList->CurrentPartition;
- /* Search for 'DefaultPath' in the 'SetupData' section */
- if (!SetupFindFirstLineW(SetupInf, L"SetupData", L"DefaultPath",
&Context))
- {
- MUIDisplayError(ERROR_FIND_SETUPDATA, Ir, POPUP_WAIT_ENTER);
- return QUIT_PAGE;
- }
-
- /* Read the 'DefaultPath' data */
- if (INF_GetData(&Context, NULL, &DefaultPath))
- {
- wcscpy(InstallDir, DefaultPath);
- }
+ if (IsUnattendedSetup)
+ wcscpy(InstallDir, UnattendInstallationDirectory);
else
- {
wcscpy(InstallDir, L"\\ReactOS");
- }
Length = wcslen(InstallDir);
CONSOLE_SetInputTextXY(8, 11, 51, InstallDir);