set SystemSetupInProgress to 1 when 2nd stage setup is running

compile setup as UNICODE

svn path=/trunk/; revision=19107
This commit is contained in:
Christoph von Wittich 2005-11-09 22:50:47 +00:00
parent 259f79e3d8
commit 5f45f14faf

View file

@ -28,6 +28,7 @@
#include <tchar.h> #include <tchar.h>
#include <syssetup/syssetup.h> #include <syssetup/syssetup.h>
#include <userenv.h> #include <userenv.h>
#include <tchar.h>
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ndk/ntndk.h> #include <ndk/ntndk.h>
@ -57,6 +58,16 @@ LPTSTR lstrchr(LPCTSTR s, TCHAR c)
} }
static VOID
SetupIsActive( DWORD dw )
{
HKEY hKey = 0;
if (RegOpenKeyEx( HKEY_LOCAL_MACHINE, _T("SYSTEM\\Setup"), 0, KEY_WRITE, &hKey ) == ERROR_SUCCESS) {
RegSetValueEx( hKey, _T("SystemSetupInProgress"), 0, REG_DWORD, (CONST BYTE *)&dw, sizeof(dw) );
RegCloseKey( hKey );
}
}
static VOID static VOID
RunNewSetup (HINSTANCE hInstance) RunNewSetup (HINSTANCE hInstance)
{ {
@ -75,7 +86,10 @@ RunNewSetup (HINSTANCE hInstance)
DPRINT("Loaded 'syssetup'!\n"); DPRINT("Loaded 'syssetup'!\n");
SetupIsActive(1);
InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS"); InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS");
SetupIsActive(0);
if (InstallReactOS == NULL) if (InstallReactOS == NULL)
{ {
DPRINT("Failed to get address for 'InstallReactOS()'!\n"); DPRINT("Failed to get address for 'InstallReactOS()'!\n");