Hi,
I was wondering if someone was able to help me with a problem I have been struggling with for quite some time now.
The problem is: I am working on a filter driver that is going to disable the network interfaces on a laptop if a certain registry DWORD value is set to ‘1’. The most natural place to store this value is in a key stored under the SOFTWARE subkey in the registry.
The filter is installed as a service, and starts automatically during the boot process. It then tries to read the DWORD value from registry. The problem is that at this time, I can just access the keys stored under the SYSTEM key in the registry - it seems like the SOFTWARE tree is not yet loaded, and that it is not loaded until the screen turns blue (that is, right before you are asked to press Ctrl + Alt + Del).
I will be very thankful if anyone know how to delay the startup of the service, or how to force the SOFTWARE registry subtree to be loaded earlier. The delivery date for this project is approaching, so I am starting to panic.
In advance, thank you very much for your help.
Best regards,
Kjetil Pedersen (kjetil.pedersen@no.thalesgroup.com mailto:kjetil.pedersen)</mailto:kjetil.pedersen>
At the risk of stating the obvious: your ‘most natural place to store this
value’ happens to be unnatural to the system boot/initialization process.
Use the system registry hive available to your driver at boot, this would be
natural to the system, although perhaps not to you.
=====================
Mark Roddy
-----Original Message-----
From: Kjetil Pedersen [mailto:Kjetil.Pedersen@no.thalesgroup.com]
Sent: Monday, July 12, 2004 9:51 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Reading registry values during boot process
Hi,
I was wondering if someone was able to help me with a problem I have been
struggling with for quite some time now.
The problem is: I am working on a filter driver that is going to disable the
network interfaces on a laptop if a certain registry DWORD value is set to
‘1’. The most natural place to store this value is in a key stored under the
SOFTWARE subkey in the registry.
The filter is installed as a service, and starts automatically during the
boot process. It then tries to read the DWORD value from registry. The
problem is that at this time, I can just access the keys stored under the
SYSTEM key in the registry - it seems like the SOFTWARE tree is not yet
loaded, and that it is not loaded until the screen turns blue (that is,
right before you are asked to press Ctrl + Alt + Del).
I will be very thankful if anyone know how to delay the startup of the
service, or how to force the SOFTWARE registry subtree to be loaded earlier.
The delivery date for this project is approaching, so I am starting to
panic.
In advance, thank you very much for your help.
Best regards,
Kjetil Pedersen (kjetil.pedersen@no.thalesgroup.com
mailto:kjetil.pedersen)
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:kjetil.pedersen>
>a laptop if a certain registry DWORD value is set to ‘1’. The most natural
place to store this
value is in a key stored under the SOFTWARE subkey in the registry.
The most natural place to store any driver parameters is SYSTEM subkey in the
registry, and not SOFTWARE.
Drivers are not allowed to store anything in SOFTWARE. Doing this = asking for
problems. For instance, SOFTWARE is accessible only very late in boot sequence,
this is the problem you observe.
keys stored under the SYSTEM key in the registry - it seems like the SOFTWARE
tree is not
yet loaded, and that it is not loaded until the screen turns blue (that is,
right before you are
Exactly. In particular, the SOFTWARE tree is not mounted when the network
stacks are initialized. It is initialized by SMSS.
I will be very thankful if anyone know how to delay the startup of the
service, or how to force the
SOFTWARE registry subtree to be loaded earlier. The delivery date for this
project is
approaching, so I am starting to panic.
No ways.
Once more: the natural place of storing the driver parameters is SYSTEM, and
not SOFTWARE. Move your value to
SYSTEM\CurrentControlSet\Services\YourDriver\Parameters, and this will solve
the problem.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com