GetSystemDirectory in Kernel Driver?

Hi,

How can I retrieve the System32 directory path in a kernel driver?
Something similar to GetSystemDirectory API.

Thank you!

I am not aware of any kernel equivalent of “GetSystemDirectory”
May be others can point any such API if available.

But why do u need such thing in your driver?

Regards
Deepak

On Mon, Mar 15, 2010 at 1:04 PM, wrote:

> Hi,
>
> How can I retrieve the System32 directory path in a kernel driver?
> Something similar to GetSystemDirectory API.
>
> Thank you!
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

I don’t know the exactly purpose, but maybe “%systemroot%” in the path
does what you want.
Best,
Hagen.

On Mon, Mar 15, 2010 at 12:14 PM, Deepak Gupta wrote:
> I am not aware of any kernel equivalent of ?“GetSystemDirectory”
> May be others can point any such API if available.
> But why do u need such thing in your driver?
> Regards
> Deepak
>
> On Mon, Mar 15, 2010 at 1:04 PM, wrote:
>>
>> Hi,
>>
>> ? How can I retrieve the System32 directory path in a kernel driver?
>> ? Something similar to GetSystemDirectory API.
>>
>> Thank you!
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
> List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


___________________
dynamic acoustics e.U.
Weyringergasse 37/3/11a
1040 Vienna / Austria
+43 680 1268 751

VAT: ATU65049413
FN: 326751t
IBAN: AT463200000010353811
BIC: RLNWATWW

You can open the symbolic link “\SystemRoot” and then query the resulting
handle for FileNameInformation. Alternatively you can open and query the
link directly (see ZwOpenSymbolicLinkObject and ZwQuerySymbolicLinkObject).

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntdev…
> Hi,
>
> How can I retrieve the System32 directory path in a kernel driver?
> Something similar to GetSystemDirectory API.
>
> Thank you!
>

wrote in message news:xxxxx@ntdev…
> Hi,
>
> How can I retrieve the System32 directory path in a kernel driver?
> Something similar to GetSystemDirectory API.
>
> Thank you!
>

The “SystemDirectory” value in
HKLM\SYSTEM\CurrentControlSet\Control\Windows ?

Regards,
–pa

> The “SystemDirectory” value in

HKLM\SYSTEM\CurrentControlSet\Control\Windows ?

%SystemRoot%\system32 on my Srv2008


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

You meant in user mode or you used this string (%SystemRoot%\system32) in
some kernel API to get system32 folder in kernel mode?

Regards
Deepak

On Fri, Mar 19, 2010 at 9:30 AM, Maxim S. Shatskih
wrote:

> > The “SystemDirectory” value in
> > HKLM\SYSTEM\CurrentControlSet\Control\Windows ?
>
> %SystemRoot%\system32 on my Srv2008
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>