Index: boot/bootdata/bootcdregtest/unattend.inf =================================================================== --- boot/bootdata/bootcdregtest/unattend.inf (revision 57578) +++ boot/bootdata/bootcdregtest/unattend.inf (working copy) @@ -45,6 +45,10 @@ DisableVmwInst = yes LocaleID = 409 +; enable this setting to boot to third stage with a MiniNT boot option +; (the registry is volatile and no changes are saved to disk) +MiniNT = yes + ; enable this section to automatically launch programs ; after 3rd boot ; Index: dll/win32/syssetup/wizard.c =================================================================== --- dll/win32/syssetup/wizard.c (revision 57578) +++ dll/win32/syssetup/wizard.c (working copy) @@ -2039,8 +2039,10 @@ INFCONTEXT InfContext; WCHAR szName[256]; WCHAR szValue[MAX_PATH]; + WCHAR szPath[MAX_PATH]; DWORD LineLength; HKEY hKey; + BOOL bMiniNTSystem = FALSE; if (!SetupFindFirstLineW(hUnattendedInf, L"Unattend", @@ -2142,6 +2144,13 @@ else SetupData.DisableVmwInst = 0; } + else if (!wcscmp(szName, L"MiniNT")) + { + if(!wcscmp(szValue, L"yes")) + bMiniNTSystem = TRUE; + else + bMiniNTSystem = FALSE; + } } while (SetupFindNextLine(&InfContext, &InfContext)); @@ -2172,7 +2181,6 @@ sizeof(szValue) / sizeof(WCHAR), NULL)) { - WCHAR szPath[MAX_PATH]; swprintf(szName, L"%d", i); DPRINT("szName %S szValue %S\n", szName, szValue); @@ -2194,6 +2202,32 @@ } RegCloseKey(hKey); + + if(bMiniNTSystem) + { + WCHAR* ptr; + DWORD ret; + + ret = GetWindowsDirectoryW(szPath, MAX_PATH); + if(!ret) return FALSE; + + ptr = wcschr(szPath, L'\\'); + if (ptr == NULL) return FALSE; + + *ptr = 0; + wcscat(szPath, L"\\freeldr.ini"); + + ret = GetPrivateProfileStringW(L"FREELOADER", L"DefaultOS", L"ReactOS", szName, sizeof(szName) / sizeof(WCHAR), szPath); + if(ret == 0) return FALSE; + + ret = GetPrivateProfileStringW(szName, L"Options", L"", szValue, sizeof(szValue) / sizeof(WCHAR), szPath); + /* in case of error szValue is an emmpty string */ + + wcscat(szValue, L" /MININT"); + ret = WritePrivateProfileString(szName, L"Options", szValue, szPath); + if(ret == 0) return FALSE; + } + return TRUE; }