Is the registry available at boot time? In my boot-time driver I am
querying a value in RTL_REGISTRY_WINDOWS_NT.
I have tried it both with the handle and directly using the key string:
L"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion"
It fails with STATUS_OBJECT_NAME_NOT_FOUND if Start=0 or 1. But it works
fine if Start=2. Yet, queries to other parts of the registry work fine at
any time, e.g.,
key=\Registry\Machine\System\CurrentControlSet\Services
Any ideas what to look at?
Thanks.
Neil
At boot time, the only registry part available is
\Registry\Machine\System\CurrentControlSet\Services
or better,
\Registry\Machine\System\CurrentControlSet\Services\YourDriver.
If you want to read another registry values, you have to wait
when they are available.
I had to solve this problem some time ago and I created
a thread which tested accessibility of a registry key
every one second. If failed, it waited one second
and tried again. This seem to work without
problems on NT4, 2000, XP.
You can also consider storing some important values
in your driver’s initialization registry key.
L.
Can you use the PsGetVersion routine instead? What information do you want
to get from registry?
–htfv
“Neil Weicher” wrote in message news:xxxxx@ntfsd…
> Is the registry available at boot time? In my boot-time driver I am
> querying a value in RTL_REGISTRY_WINDOWS_NT.
>
> I have tried it both with the handle and directly using the key string:
>
> L"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion"
>
> It fails with STATUS_OBJECT_NAME_NOT_FOUND if Start=0 or 1. But it works
> fine if Start=2. Yet, queries to other parts of the registry work fine at
> any time, e.g.,
>
> key=\Registry\Machine\System\CurrentControlSet\Services
>
> Any ideas what to look at?
>
> Thanks.
>
> Neil
>
>
>
>
This branch of registry is not available till rather late time when SMSS
will mount it.
Only the SYSTEM registry is generally available for drivers.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Neil Weicher”
To: “Windows File Systems Devs Interest List”
Sent: Wednesday, February 25, 2004 6:02 PM
Subject: [ntfsd] RtlQueryRegistryValues woes
> Is the registry available at boot time? In my boot-time driver I am
> querying a value in RTL_REGISTRY_WINDOWS_NT.
>
> I have tried it both with the handle and directly using the key string:
>
> L"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion"
>
> It fails with STATUS_OBJECT_NAME_NOT_FOUND if Start=0 or 1. But it works
> fine if Start=2. Yet, queries to other parts of the registry work fine at
> any time, e.g.,
>
> key=\Registry\Machine\System\CurrentControlSet\Services
>
> Any ideas what to look at?
>
> Thanks.
>
> Neil
>
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
The whole \Registry\Machine\System hive is loaded as a unit, so, it all
will be available. For instance, SystemStartOptions in
CurrentControlSet\Control is available and holds the BOOT.INI parameters.
It is tested and working on all NTs from NT4 to w2k3.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Ladislav Zezula”
To: “Windows File Systems Devs Interest List”
Sent: Thursday, February 26, 2004 9:16 AM
Subject: Re: [ntfsd] RtlQueryRegistryValues woes
> At boot time, the only registry part available is
> \Registry\Machine\System\CurrentControlSet\Services
> or better,
> \Registry\Machine\System\CurrentControlSet\Services\YourDriver.
>
> If you want to read another registry values, you have to wait
> when they are available.
> I had to solve this problem some time ago and I created
> a thread which tested accessibility of a registry key
> every one second. If failed, it waited one second
> and tried again. This seem to work without
> problems on NT4, 2000, XP.
>
> You can also consider storing some important values
> in your driver’s initialization registry key.
>
> L.
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com