write to registry at driver entry

Hi,

I try to write a value to the registry at DriverEntry in my driver.
However nothing is written.
Why is that so?
How can I write a value to a registry at DriverEntry?

I have done :

  • ZwOpen
  • ZwSetValue
  • ZwFlushKey
  • ZwClose

All the status returned is a success.

However nothing is written, until winlogon is up.
Is it possible to write a value to the registry immediately?

Thank You!

cheers,
vincent


Take a break! Find destinations on MSN Travel. http://www.msn.com.sg/travel/

What is your driver Type value?
Which registry hive are you writing to?

Boot drivers can not write to SOFTWARE hive.
Try writeing to a key under SERVICES\yourdriver it would work.

-Srin.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
Sent: Tuesday, March 23, 2004 2:10 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] write to registry at driver entry

Hi,

I try to write a value to the registry at DriverEntry in my driver.
However nothing is written.
Why is that so?
How can I write a value to a registry at DriverEntry?

I have done :

  • ZwOpen
  • ZwSetValue
  • ZwFlushKey
  • ZwClose

All the status returned is a success.

However nothing is written, until winlogon is up.
Is it possible to write a value to the registry immediately?

Thank You!

cheers,
vincent


Take a break! Find destinations on MSN Travel.
http://www.msn.com.sg/travel/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi,

I write it to the key under SERVICES\mydriver.
It did work only when winlogon.exe is up.
However it did not write immediately to the key under SERVICES\mydriver.

Why is that so?
The writing is not immediate?

thank you!

cheers,
vincent

From:
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: RE: [ntdev] write to registry at driver entry
>Date: Tue, 23 Mar 2004 11:04:18 -0800
>
>What is your driver Type value?
>Which registry hive are you writing to?
>
>Boot drivers can not write to SOFTWARE hive.
>Try writeing to a key under SERVICES\yourdriver it would work.
>
>-Srin.
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
> > Sent: Tuesday, March 23, 2004 2:10 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] write to registry at driver entry
> >
> > Hi,
> >
> > I try to write a value to the registry at DriverEntry in my driver.
> > However nothing is written.
> > Why is that so?
> > How can I write a value to a registry at DriverEntry?
> >
> > I have done :
> > - ZwOpen
> > - ZwSetValue
> > - ZwFlushKey
> > - ZwClose
> >
> > All the status returned is a success.
> >
> > However nothing is written, until winlogon is up.
> > Is it possible to write a value to the registry immediately?
> >
> > Thank You!
> >
> > cheers,
> > vincent
> >
> >
> > Take a break! Find destinations on MSN Travel.
> > http://www.msn.com.sg/travel/
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@nai.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Get 10mb of inbox space with MSN Hotmail Extra Storage
http://join.msn.com/?pgmarket=en-sg

Hi,

I write it to the key under SERVICES\mydriver.
It did work only when winlogon.exe is up.
However it did not write immediately to the key under SERVICES\mydriver.

Why is that so?
The writing is not immediate?

thank you!

cheers,
vincent

From:
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: RE: [ntdev] write to registry at driver entry
>Date: Tue, 23 Mar 2004 11:04:18 -0800
>
>What is your driver Type value?
>Which registry hive are you writing to?
>
>Boot drivers can not write to SOFTWARE hive.
>Try writeing to a key under SERVICES\yourdriver it would work.
>
>-Srin.
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
> > Sent: Tuesday, March 23, 2004 2:10 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] write to registry at driver entry
> >
> > Hi,
> >
> > I try to write a value to the registry at DriverEntry in my driver.
> > However nothing is written.
> > Why is that so?
> > How can I write a value to a registry at DriverEntry?
> >
> > I have done :
> > - ZwOpen
> > - ZwSetValue
> > - ZwFlushKey
> > - ZwClose
> >
> > All the status returned is a success.
> >
> > However nothing is written, until winlogon is up.
> > Is it possible to write a value to the registry immediately?
> >
> > Thank You!
> >
> > cheers,
> > vincent
> >
> >
> > Take a break! Find destinations on MSN Travel.
> > http://www.msn.com.sg/travel/
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@nai.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Find it on the web with MSN Search. http://search.msn.com.sg/

What do you mean by “the writing is not immediate”. Is the value not
available through the registry API? Or are you watching for changes on
the disk?

Changes to the registry are cached (by the registry subsystem) until the
file systems have been checked and are made writable. I think they may
also be cached until winlogon has been given a chance to save a snapshot
of the registry as “last known good” (the last registry configuration
that was able to boot the system)

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
Sent: Tuesday, March 23, 2004 6:20 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] write to registry at driver entry

Hi,

I write it to the key under SERVICES\mydriver.
It did work only when winlogon.exe is up.
However it did not write immediately to the key under SERVICES\mydriver.

Why is that so?
The writing is not immediate?

thank you!

cheers,
vincent

From:
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: RE: [ntdev] write to registry at driver entry
>Date: Tue, 23 Mar 2004 11:04:18 -0800
>
>What is your driver Type value?
>Which registry hive are you writing to?
>
>Boot drivers can not write to SOFTWARE hive.
>Try writeing to a key under SERVICES\yourdriver it would work.
>
>-Srin.
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of vincent
> > gambit
> > Sent: Tuesday, March 23, 2004 2:10 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] write to registry at driver entry
> >
> > Hi,
> >
> > I try to write a value to the registry at DriverEntry in my driver.
> > However nothing is written.
> > Why is that so?
> > How can I write a value to a registry at DriverEntry?
> >
> > I have done :
> > - ZwOpen
> > - ZwSetValue
> > - ZwFlushKey
> > - ZwClose
> >
> > All the status returned is a success.
> >
> > However nothing is written, until winlogon is up.
> > Is it possible to write a value to the registry immediately?
> >
> > Thank You!
> >
> > cheers,
> > vincent
> >
> >
> > Take a break! Find destinations on MSN Travel.
> > http://www.msn.com.sg/travel/
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@nai.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com To
>unsubscribe send a blank email to xxxxx@lists.osr.com


Find it on the web with MSN Search. http://search.msn.com.sg/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

hi,

Using windlbg, I identify that write has been made successfully to the
registry.
then i qucikly power off the system
and when i boot up again n read the registry again, the key that i wrote
just now was not there.
i am using vmware.

thank you!

From: “Peter Wieland”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: RE: [ntdev] write to registry at driver entry
>Date: Wed, 24 Mar 2004 07:11:55 -0800
>
>What do you mean by “the writing is not immediate”. Is the value not
>available through the registry API? Or are you watching for changes on
>the disk?
>
>Changes to the registry are cached (by the registry subsystem) until the
>file systems have been checked and are made writable. I think they may
>also be cached until winlogon has been given a chance to save a snapshot
>of the registry as “last known good” (the last registry configuration
>that was able to boot the system)
>
>-p
>
>-----Original Message-----
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
>Sent: Tuesday, March 23, 2004 6:20 PM
>To: Windows System Software Devs Interest List
>Subject: RE: [ntdev] write to registry at driver entry
>
>Hi,
>
>I write it to the key under SERVICES\mydriver.
>It did work only when winlogon.exe is up.
>However it did not write immediately to the key under SERVICES\mydriver.
>
>Why is that so?
>The writing is not immediate?
>
>thank you!
>
>cheers,
>vincent
>
>
> >From:
> >Reply-To: “Windows System Software Devs Interest List”
> >
> >To: “Windows System Software Devs Interest List”
> >Subject: RE: [ntdev] write to registry at driver entry
> >Date: Tue, 23 Mar 2004 11:04:18 -0800
> >
> >What is your driver Type value?
> >Which registry hive are you writing to?
> >
> >Boot drivers can not write to SOFTWARE hive.
> >Try writeing to a key under SERVICES\yourdriver it would work.
> >
> >-Srin.
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of vincent
> > > gambit
> > > Sent: Tuesday, March 23, 2004 2:10 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] write to registry at driver entry
> > >
> > > Hi,
> > >
> > > I try to write a value to the registry at DriverEntry in my driver.
> > > However nothing is written.
> > > Why is that so?
> > > How can I write a value to a registry at DriverEntry?
> > >
> > > I have done :
> > > - ZwOpen
> > > - ZwSetValue
> > > - ZwFlushKey
> > > - ZwClose
> > >
> > > All the status returned is a success.
> > >
> > > However nothing is written, until winlogon is up.
> > > Is it possible to write a value to the registry immediately?
> > >
> > > Thank You!
> > >
> > > cheers,
> > > vincent
> > >
> > >
> > > Take a break! Find destinations on MSN Travel.
> > > http://www.msn.com.sg/travel/
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@nai.com To
> > > unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com To
> >unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

>Find it on the web with MSN Search. http://search.msn.com.sg/
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com

_________________________________________________________________
Find it on the web with MSN Search. http://search.msn.com.sg/

That is probably because Windows doesn’t want to store the registry
“properly” until it’s known that you can log in with this option, as it
wants to make a copy for the “Last known good” registry settings. So until
you log in, any registry write is just cached in memory, and not committed
to permanent storage.

This is just what I read from what Peter stated earlier, I’m by far no
expert on Registry operations.

What are you trying to achieve?


Mats

-----Original Message-----
From: vincent gambit [mailto:xxxxx@hotmail.com]
Sent: Thursday, March 25, 2004 12:47 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] write to registry at driver entry

hi,

Using windlbg, I identify that write has been made
successfully to the
registry.
then i qucikly power off the system
and when i boot up again n read the registry again, the key
that i wrote
just now was not there.
i am using vmware.

thank you!

>From: “Peter Wieland”
> >Reply-To: “Windows System Software Devs Interest List”
> >
> >To: “Windows System Software Devs Interest List”
>
> >Subject: RE: [ntdev] write to registry at driver entry
> >Date: Wed, 24 Mar 2004 07:11:55 -0800
> >
> >What do you mean by “the writing is not immediate”. Is the value not
> >available through the registry API? Or are you watching for
> changes on
> >the disk?
> >
> >Changes to the registry are cached (by the registry
> subsystem) until the
> >file systems have been checked and are made writable. I
> think they may
> >also be cached until winlogon has been given a chance to
> save a snapshot
> >of the registry as “last known good” (the last registry configuration
> >that was able to boot the system)
> >
> >-p
> >
> >-----Original Message-----
> >From: xxxxx@lists.osr.com
> >[mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
> >Sent: Tuesday, March 23, 2004 6:20 PM
> >To: Windows System Software Devs Interest List
> >Subject: RE: [ntdev] write to registry at driver entry
> >
> >Hi,
> >
> >I write it to the key under SERVICES\mydriver.
> >It did work only when winlogon.exe is up.
> >However it did not write immediately to the key under
> SERVICES\mydriver.
> >
> >Why is that so?
> >The writing is not immediate?
> >
> >thank you!
> >
> >cheers,
> >vincent
> >
> >
> > >From:
> > >Reply-To: “Windows System Software Devs Interest List”
> > >
> > >To: “Windows System Software Devs Interest List”
>
> > >Subject: RE: [ntdev] write to registry at driver entry
> > >Date: Tue, 23 Mar 2004 11:04:18 -0800
> > >
> > >What is your driver Type value?
> > >Which registry hive are you writing to?
> > >
> > >Boot drivers can not write to SOFTWARE hive.
> > >Try writeing to a key under SERVICES\yourdriver it would work.
> > >
> > >-Srin.
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of vincent
> > > > gambit
> > > > Sent: Tuesday, March 23, 2004 2:10 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: [ntdev] write to registry at driver entry
> > > >
> > > > Hi,
> > > >
> > > > I try to write a value to the registry at DriverEntry
> in my driver.
> > > > However nothing is written.
> > > > Why is that so?
> > > > How can I write a value to a registry at DriverEntry?
> > > >
> > > > I have done :
> > > > - ZwOpen
> > > > - ZwSetValue
> > > > - ZwFlushKey
> > > > - ZwClose
> > > >
> > > > All the status returned is a success.
> > > >
> > > > However nothing is written, until winlogon is up.
> > > > Is it possible to write a value to the registry immediately?
> > > >
> > > > Thank You!
> > > >
> > > > cheers,
> > > > vincent
> > > >
> > > >
>
> > > > Take a break! Find destinations on MSN Travel.
> > > > http://www.msn.com.sg/travel/
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@nai.com To
> > > > unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > > >
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as:
> xxxxx@hotmail.com To
> > >unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >

> >Find it on the web with MSN Search. http://search.msn.com.sg/
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> _________________________________________________________________
> Find it on the web with MSN Search. http://search.msn.com.sg/
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

From what I know, the SYSTEM registry is fully and finally mounted after
AUTOCHK, and at the same time with the SOFTWARE registry.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Thursday, March 25, 2004 4:05 PM
Subject: RE: [ntdev] write to registry at driver entry

> That is probably because Windows doesn’t want to store the registry
> “properly” until it’s known that you can log in with this option, as it
> wants to make a copy for the “Last known good” registry settings. So until
> you log in, any registry write is just cached in memory, and not committed
> to permanent storage.
>
> This is just what I read from what Peter stated earlier, I’m by far no
> expert on Registry operations.
>
> What are you trying to achieve?
>
> –
> Mats
>
> > -----Original Message-----
> > From: vincent gambit [mailto:xxxxx@hotmail.com]
> > Sent: Thursday, March 25, 2004 12:47 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] write to registry at driver entry
> >
> >
> > hi,
> >
> > Using windlbg, I identify that write has been made
> > successfully to the
> > registry.
> > then i qucikly power off the system
> > and when i boot up again n read the registry again, the key
> > that i wrote
> > just now was not there.
> > i am using vmware.
> >
> > thank you!
> >
> > >From: “Peter Wieland”
> > >Reply-To: “Windows System Software Devs Interest List”
> > >
> > >To: “Windows System Software Devs Interest List”
> >
> > >Subject: RE: [ntdev] write to registry at driver entry
> > >Date: Wed, 24 Mar 2004 07:11:55 -0800
> > >
> > >What do you mean by “the writing is not immediate”. Is the value not
> > >available through the registry API? Or are you watching for
> > changes on
> > >the disk?
> > >
> > >Changes to the registry are cached (by the registry
> > subsystem) until the
> > >file systems have been checked and are made writable. I
> > think they may
> > >also be cached until winlogon has been given a chance to
> > save a snapshot
> > >of the registry as “last known good” (the last registry configuration
> > >that was able to boot the system)
> > >
> > >-p
> > >
> > >-----Original Message-----
> > >From: xxxxx@lists.osr.com
> > >[mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
> > >Sent: Tuesday, March 23, 2004 6:20 PM
> > >To: Windows System Software Devs Interest List
> > >Subject: RE: [ntdev] write to registry at driver entry
> > >
> > >Hi,
> > >
> > >I write it to the key under SERVICES\mydriver.
> > >It did work only when winlogon.exe is up.
> > >However it did not write immediately to the key under
> > SERVICES\mydriver.
> > >
> > >Why is that so?
> > >The writing is not immediate?
> > >
> > >thank you!
> > >
> > >cheers,
> > >vincent
> > >
> > >
> > > >From:
> > > >Reply-To: “Windows System Software Devs Interest List”
> > > >
> > > >To: “Windows System Software Devs Interest List”
> >
> > > >Subject: RE: [ntdev] write to registry at driver entry
> > > >Date: Tue, 23 Mar 2004 11:04:18 -0800
> > > >
> > > >What is your driver Type value?
> > > >Which registry hive are you writing to?
> > > >
> > > >Boot drivers can not write to SOFTWARE hive.
> > > >Try writeing to a key under SERVICES\yourdriver it would work.
> > > >
> > > >-Srin.
> > > > > -----Original Message-----
> > > > > From: xxxxx@lists.osr.com
> > > > > [mailto:xxxxx@lists.osr.com] On Behalf Of vincent
> > > > > gambit
> > > > > Sent: Tuesday, March 23, 2004 2:10 AM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: [ntdev] write to registry at driver entry
> > > > >
> > > > > Hi,
> > > > >
> > > > > I try to write a value to the registry at DriverEntry
> > in my driver.
> > > > > However nothing is written.
> > > > > Why is that so?
> > > > > How can I write a value to a registry at DriverEntry?
> > > > >
> > > > > I have done :
> > > > > - ZwOpen
> > > > > - ZwSetValue
> > > > > - ZwFlushKey
> > > > > - ZwClose
> > > > >
> > > > > All the status returned is a success.
> > > > >
> > > > > However nothing is written, until winlogon is up.
> > > > > Is it possible to write a value to the registry immediately?
> > > > >
> > > > > Thank You!
> > > > >
> > > > > cheers,
> > > > > vincent
> > > > >
> > > > >
> >
> > > > > Take a break! Find destinations on MSN Travel.
> > > > > http://www.msn.com.sg/travel/
> > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > You are currently subscribed to ntdev as: xxxxx@nai.com To
> > > > > unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > > > >
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > >
> > > >You are currently subscribed to ntdev as:
> > xxxxx@hotmail.com To
> > > >unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >

> > >Find it on the web with MSN Search. http://search.msn.com.sg/
> > >
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as:
> > xxxxx@windows.microsoft.com
> > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > _________________________________________________________________
> > Find it on the web with MSN Search. http://search.msn.com.sg/
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Have you checked in the other control sets besides CurrentControlSet?
These switch around from boot to boot under certain circumstances
related to crashes, device installation, and when the user first
successfully logs in after these kinds of events (I’ve never seen this
fully documented anywhere, BTW).

If you’re just yanking the power, though, the cached writes might not
have been flushed to disk yet… that’s part of what happens during a
proper shutdown… (no, I’m not sure that applies to the registry :-).

vincent gambit wrote:

hi,

Using windlbg, I identify that write has been made successfully to the
registry.
then i qucikly power off the system
and when i boot up again n read the registry again, the key that i wrote
just now was not there.
i am using vmware.

thank you!

> From: “Peter Wieland”
>> Reply-To: “Windows System Software Devs Interest List”
>>
>> To: “Windows System Software Devs Interest List”
>> Subject: RE: [ntdev] write to registry at driver entry
>> Date: Wed, 24 Mar 2004 07:11:55 -0800
>>
>> What do you mean by “the writing is not immediate”. Is the value not
>> available through the registry API? Or are you watching for changes on
>> the disk?
>>
>> Changes to the registry are cached (by the registry subsystem) until the
>> file systems have been checked and are made writable. I think they may
>> also be cached until winlogon has been given a chance to save a snapshot
>> of the registry as “last known good” (the last registry configuration
>> that was able to boot the system)
>>
>> -p
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
>> Sent: Tuesday, March 23, 2004 6:20 PM
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] write to registry at driver entry
>>
>> Hi,
>>
>> I write it to the key under SERVICES\mydriver.
>> It did work only when winlogon.exe is up.
>> However it did not write immediately to the key under SERVICES\mydriver.
>>
>> Why is that so?
>> The writing is not immediate?
>>
>> thank you!
>>
>> cheers,
>> vincent
>>
>>
>> >From:
>> >Reply-To: “Windows System Software Devs Interest List”
>> >
>> >To: “Windows System Software Devs Interest List”
>> >Subject: RE: [ntdev] write to registry at driver entry
>> >Date: Tue, 23 Mar 2004 11:04:18 -0800
>> >
>> >What is your driver Type value?
>> >Which registry hive are you writing to?
>> >
>> >Boot drivers can not write to SOFTWARE hive.
>> >Try writeing to a key under SERVICES\yourdriver it would work.
>> >
>> >-Srin.
>> > > -----Original Message-----
>> > > From: xxxxx@lists.osr.com
>> > > [mailto:xxxxx@lists.osr.com] On Behalf Of vincent
>> > > gambit
>> > > Sent: Tuesday, March 23, 2004 2:10 AM
>> > > To: Windows System Software Devs Interest List
>> > > Subject: [ntdev] write to registry at driver entry
>> > >
>> > > Hi,
>> > >
>> > > I try to write a value to the registry at DriverEntry in my driver.
>> > > However nothing is written.
>> > > Why is that so?
>> > > How can I write a value to a registry at DriverEntry?
>> > >
>> > > I have done :
>> > > - ZwOpen
>> > > - ZwSetValue
>> > > - ZwFlushKey
>> > > - ZwClose
>> > >
>> > > All the status returned is a success.
>> > >
>> > > However nothing is written, until winlogon is up.
>> > > Is it possible to write a value to the registry immediately?
>> > >
>> > > Thank You!
>> > >
>> > > cheers,
>> > > vincent
>> > >
>> > >
>> > > Take a break! Find destinations on MSN Travel.
>> > > http://www.msn.com.sg/travel/
>> > >
>> > >
>> > > —
>> > > Questions? First check the Kernel Driver FAQ at
>> > > http://www.osronline.com/article.cfm?id=256
>> > >
>> > > You are currently subscribed to ntdev as: xxxxx@nai.com To
>> > > unsubscribe send a blank email to xxxxx@lists.osr.com
>> > >
>> >
>> >—
>> >Questions? First check the Kernel Driver FAQ at
>> >http://www.osronline.com/article.cfm?id=256
>> >
>> >You are currently subscribed to ntdev as: xxxxx@hotmail.com To
>> >unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>

>> Find it on the web with MSN Search. http://search.msn.com.sg/
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@hotmail.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> _________________________________________________________________
> Find it on the web with MSN Search. http://search.msn.com.sg/
>
>


…/ray..