3 * Copyright (C) 2003 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS GUI/console setup
22 * FILE: subsys/system/setup/setup.c
23 * PURPOSE: Second stage setup
24 * PROGRAMMER: Eric Kohl
29 #include <syssetup/syssetup.h>
32 #define NTOS_MODE_USER
33 #include <ndk/ntndk.h>
39 typedef DWORD
STDCALL (*PINSTALL_REACTOS
)(HINSTANCE hInstance
);
42 /* FUNCTIONS ****************************************************************/
44 LPTSTR
lstrchr(LPCTSTR s
, TCHAR c
)
61 RunNewSetup (HINSTANCE hInstance
)
64 PINSTALL_REACTOS InstallReactOS
;
66 /* some dlls (loaded by syssetup) need a valid user profile */
69 hDll
= LoadLibrary (TEXT("syssetup"));
72 DPRINT("Failed to load 'syssetup'!\n");
76 DPRINT("Loaded 'syssetup'!\n");
78 InstallReactOS
= (PINSTALL_REACTOS
)GetProcAddress (hDll
, "InstallReactOS");
79 if (InstallReactOS
== NULL
)
81 DPRINT("Failed to get address for 'InstallReactOS()'!\n");
86 InstallReactOS (hInstance
);
93 WinMain (HINSTANCE hInstance
,
94 HINSTANCE hPrevInstance
,
101 CmdLine
= GetCommandLine ();
103 DPRINT("CmdLine: <%s>\n",CmdLine
);
105 p
= lstrchr (CmdLine
, TEXT('-'));
109 if (!lstrcmpi (p
, TEXT("-newsetup")))
111 RunNewSetup (hInstance
);
115 /* Add new setup types here */