Hi NG,

i actually have implemented the hive based registry on an IDE Harddrive. So
far everthing works fine, but how can i tell CE to delete the registry and
make a clean boot??

I found in the help files something about IOCTL_HAL_GET_HIVE_CLEAN_FLAG, but
i don't know who and where this flag will be asked. For me it sounds like
the atapi driver will be asked that. Is that rigth?? And if yes, how can i
tell the atapi driver to answer false to the filesys.exe?

So is there any simple function like RegFlushKey(), which deletes the file
on my persistent storage device??

Best regards,
Oliver Münchow
--
---------------------------------------
Gesytec GmbH eMail:
52076 Aachen omuenchowATgesytecDOTde
http://www.gesytec.de

Re: Deleting Hive-based registry by Dean

Dean
Mon Nov 10 08:09:21 CST 2003

That IOCTL is called by filesys.exe at startup. Filesys will cause the
hives to be cleaned/deleted if you return true in this IOCTL. Note that it
only happens at startup, not during normal runtime. You are free to create
an API that will somehow notify the kernel to return true on this IOCTL on
the next boot. Calling your new API and then doing a warm boot would cause
the registry to be deleted.

--
Dean Ramsier - eMVP
Accelent Systems
http://www.accelent.com

"Oliver Münchow" <omuenchow@NOSPAMgesytecDOT.de> wrote in message
news:ODRRS83pDHA.2676@TK2MSFTNGP11.phx.gbl...
> Hi NG,
>
> i actually have implemented the hive based registry on an IDE Harddrive.
So
> far everthing works fine, but how can i tell CE to delete the registry and
> make a clean boot??
>
> I found in the help files something about IOCTL_HAL_GET_HIVE_CLEAN_FLAG,
but
> i don't know who and where this flag will be asked. For me it sounds like
> the atapi driver will be asked that. Is that rigth?? And if yes, how can i
> tell the atapi driver to answer false to the filesys.exe?
>
> So is there any simple function like RegFlushKey(), which deletes the file
> on my persistent storage device??
>
> Best regards,
> Oliver Münchow
> --
> ---------------------------------------
> Gesytec GmbH eMail:
> 52076 Aachen omuenchowATgesytecDOTde
> http://www.gesytec.de
>
>
>



Re: Deleting Hive-based registry by Oliver

Oliver
Mon Nov 10 09:56:12 CST 2003

Hi Dean,

ok, that's understand, but whom will filesys.exe call the IOCTL?? You wrote
something about the kernel. Do you know where (in which file excactly) this
IOCTL will be processd??

Best regards,
Oliver Münchow

--
---------------------------------------
Gesytec GmbH eMail:
52076 Aachen omuenchowATgesytecDOTde
http://www.gesytec.de


"Dean Ramsier" <dramsiernospam@accelentnospam.com> schrieb im Newsbeitrag
news:uK9V%23Q5pDHA.3612@TK2MSFTNGP11.phx.gbl...
> That IOCTL is called by filesys.exe at startup. Filesys will cause the
> hives to be cleaned/deleted if you return true in this IOCTL. Note that
it
> only happens at startup, not during normal runtime. You are free to
create
> an API that will somehow notify the kernel to return true on this IOCTL on
> the next boot. Calling your new API and then doing a warm boot would
cause
> the registry to be deleted.
>
> --
> Dean Ramsier - eMVP
> Accelent Systems
> http://www.accelent.com
>
> "Oliver Münchow" <omuenchow@NOSPAMgesytecDOT.de> wrote in message
> news:ODRRS83pDHA.2676@TK2MSFTNGP11.phx.gbl...
> > Hi NG,
> >
> > i actually have implemented the hive based registry on an IDE Harddrive.
> So
> > far everthing works fine, but how can i tell CE to delete the registry
and
> > make a clean boot??
> >
> > I found in the help files something about IOCTL_HAL_GET_HIVE_CLEAN_FLAG,
> but
> > i don't know who and where this flag will be asked. For me it sounds
like
> > the atapi driver will be asked that. Is that rigth?? And if yes, how can
i
> > tell the atapi driver to answer false to the filesys.exe?
> >
> > So is there any simple function like RegFlushKey(), which deletes the
file
> > on my persistent storage device??
> >
> > Best regards,
> > Oliver Münchow
> > --
> > ---------------------------------------
> > Gesytec GmbH eMail:
> > 52076 Aachen omuenchowATgesytecDOTde
> > http://www.gesytec.de
> >
> >
> >
>
>



Re: Deleting Hive-based registry by Reid

Reid
Mon Nov 10 17:25:38 CST 2003

Hello Oliver,
You will need to add this IOCTL in the file OEMIOCTL.C in your project's
"Kernel\HAL" directory. In this file you will find the function
"OEMIoControl", just add the IOCTL_HAL_GET_HIVE_CLEAN_FLAG to the list of
other IOCTL case statements. The user documentation describes the values it
should return for the appropriate condition. The trick is then to have a
flag or non-volatile register somewhere in your system that the code can
read to determine how to respond to this IOCTL. In our code I added a new
variable to the BootArgs structure passed into the system by the Bootloader.
The Bootloader reads an .ini file to determine what value should be put into
this new variable depending on if the persistent registry should be deleted.
If I had access to a non-volatile system register somewhere (like
battery-backed CMOS), I would have used this instead, as the flag for
determining if the registry were to be deleted.
Hope these ideas help. You can also search this user group for this
same topic, because it also came up a month or so ago.

Reid



Re: Deleting Hive-based registry by Oliver

Oliver
Tue Nov 11 02:56:41 CST 2003

Hi Reid,

thanks for the support. Now i understand the behaviour and also found the
second possibility with RegReplaceKey() with Google.

Bye,
Oliver

--
---------------------------------------
Gesytec GmbH eMail:
52076 Aachen omuenchowATgesytecDOTde
http://www.gesytec.de


"Reid" <Reid@DieSpamersDie.com> schrieb im Newsbeitrag
news:ezQy2H%23pDHA.1084@tk2msftngp13.phx.gbl...
> Hello Oliver,
> You will need to add this IOCTL in the file OEMIOCTL.C in your
project's
> "Kernel\HAL" directory. In this file you will find the function
> "OEMIoControl", just add the IOCTL_HAL_GET_HIVE_CLEAN_FLAG to the list of
> other IOCTL case statements. The user documentation describes the values
it
> should return for the appropriate condition. The trick is then to have a
> flag or non-volatile register somewhere in your system that the code can
> read to determine how to respond to this IOCTL. In our code I added a new
> variable to the BootArgs structure passed into the system by the
Bootloader.
> The Bootloader reads an .ini file to determine what value should be put
into
> this new variable depending on if the persistent registry should be
deleted.
> If I had access to a non-volatile system register somewhere (like
> battery-backed CMOS), I would have used this instead, as the flag for
> determining if the registry were to be deleted.
> Hope these ideas help. You can also search this user group for this
> same topic, because it also came up a month or so ago.
>
> Reid
>
>