mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
[USERINIT]: Usability commit: when in LiveCD mode, if we cannot start the shell or the installer, display again the main menu.
svn path=/trunk/; revision=72823
This commit is contained in:
@@ -577,13 +577,18 @@ wWinMain(IN HINSTANCE hInst,
|
||||
IN LPWSTR lpszCmdLine,
|
||||
IN int nCmdShow)
|
||||
{
|
||||
BOOL bIsLiveCD;
|
||||
BOOL Success;
|
||||
STATE State;
|
||||
|
||||
hInstance = hInst;
|
||||
|
||||
bIsLiveCD = IsLiveCD();
|
||||
|
||||
Restart:
|
||||
SetUserSettings();
|
||||
|
||||
if (IsLiveCD())
|
||||
if (bIsLiveCD)
|
||||
{
|
||||
State.NextPage = LOCALEPAGE;
|
||||
State.Run = SHELL;
|
||||
@@ -594,21 +599,29 @@ wWinMain(IN HINSTANCE hInst,
|
||||
State.Run = SHELL;
|
||||
}
|
||||
|
||||
if (State.NextPage != DONE)
|
||||
if (State.NextPage != DONE) // && bIsLiveCD
|
||||
{
|
||||
RunLiveCD(&State);
|
||||
}
|
||||
|
||||
if (State.Run == SHELL)
|
||||
{
|
||||
StartShell();
|
||||
NotifyLogon();
|
||||
Success = StartShell();
|
||||
if (Success)
|
||||
NotifyLogon();
|
||||
}
|
||||
else if (State.Run == INSTALLER)
|
||||
{
|
||||
StartInstaller();
|
||||
Success = StartInstaller();
|
||||
}
|
||||
|
||||
/*
|
||||
* In LiveCD mode, go back to the main menu if we failed
|
||||
* to either start the shell or the installer.
|
||||
*/
|
||||
if (bIsLiveCD && !Success)
|
||||
goto Restart;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user