LiveCD change: don't directly name the shell executable in SYSTEM\Setup key, but run setup.exe, which then loads syssetup.dll, which then runs the selected shell.

This is the first step to do custom operations when running the livecd.

svn path=/trunk/; revision=23016
This commit is contained in:
Hervé Poussineau
2006-07-12 11:30:17 +00:00
parent 7a738ccc46
commit 604e593d4d
4 changed files with 124 additions and 4 deletions
+31
View File
@@ -85,6 +85,33 @@ RunNewSetup (HINSTANCE hInstance)
FreeLibrary (hDll);
}
static VOID
RunLiveCD (HINSTANCE hInstance)
{
HMODULE hDll;
PINSTALL_REACTOS InstallLiveCD;
hDll = LoadLibrary (TEXT("syssetup"));
if (hDll == NULL)
{
DPRINT("Failed to load 'syssetup'!\n");
return;
}
DPRINT("Loaded 'syssetup'!\n");
InstallLiveCD = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallLiveCD");
if (InstallLiveCD == NULL)
{
DPRINT("Failed to get address for 'InstallReactOS()'!\n");
FreeLibrary (hDll);
return;
}
InstallLiveCD (hInstance);
FreeLibrary (hDll);
}
int STDCALL
WinMain (HINSTANCE hInstance,
@@ -107,6 +134,10 @@ WinMain (HINSTANCE hInstance,
{
RunNewSetup (hInstance);
}
else if (!lstrcmpi (p, TEXT("-mini")))
{
RunLiveCD (hInstance);
}
#if 0
/* Add new setup types here */