Start to fill-in the registry.

svn path=/trunk/; revision=4265
This commit is contained in:
Eric Kohl 2003-03-08 19:29:09 +00:00
parent a130f0e169
commit 098af174b6
4 changed files with 476 additions and 462 deletions

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.7 2003/01/17 13:18:15 ekohl Exp $
# $Id: makefile,v 1.8 2003/03/08 19:29:09 ekohl Exp $
PATH_TO_TOP = ../../..
@ -13,7 +13,7 @@ TARGET_INSTALLDIR = system32
TARGET_CFLAGS = -D__NTAPP__
TARGET_OBJECTS = $(TARGET_NAME).o bootsup.o console.o drivesup.o filequeue.o \
filesup.o inicache.o partlist.o progress.o
filesup.o inicache.o partlist.o progress.o registry.o
include $(PATH_TO_TOP)/rules.mak

View file

@ -0,0 +1,79 @@
/*
* ReactOS kernel
* Copyright (C) 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/registry.c
* PURPOSE: Registry creation functions
* PROGRAMMER: Eric Kohl
*/
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include "usetup.h"
#include "registry.h"
/* FUNCTIONS ****************************************************************/
NTSTATUS
SetupUpdateRegistry(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
// UNICODE_STRING ValueName;
HANDLE KeyHandle;
NTSTATUS Status;
RtlInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
Status = NtCreateKey(&KeyHandle,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
NULL,
REG_OPTION_NON_VOLATILE,
NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
}
NtClose(KeyHandle);
/* FIXME: Create key '\Registry\Machine\System\Setup' */
/* FIXME: Create value 'SetupType' */
/* FIXME: Create value 'SystemSetupInProgress' */
return STATUS_SUCCESS;
}
/* EOF */

View file

@ -0,0 +1,35 @@
/*
* ReactOS kernel
* Copyright (C) 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: registry.h,v 1.1 2003/03/08 19:29:09 ekohl Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/registry.h
* PURPOSE: Registry creation functions
* PROGRAMMER: Eric Kohl
*/
#ifndef __REGISTRY_H__
#define __REGISTRY_H__
NTSTATUS
SetupUpdateRegistry(VOID);
#endif /* __REGISTRY_H__ */
/* EOF */

File diff suppressed because it is too large Load diff