[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:
Hermès Bélusca-Maïto
2016-09-26 22:49:13 +00:00
parent 6c90c67259
commit 3f6ca86312
+18 -5
View File
@@ -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;
}