RES: Problem with opening file in system32.

You could use the value “SystemPartition” stored in
HKEY_LOCAL_MACHINE\SYSTEM\Setup to build the full path

\Device\HarddiskVolume2\Windows\System32\abc.txt

s,

Fernando Roberto da Silva
DriverEntry Kernel Development
http://www.driverentry.com.br

-----Mensagem original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Em nome de
xxxxx@yahoo.com
Enviada em: quinta-feira, 23 de agosto de 2007 09:55
Para: Windows System Software Devs Interest List
Assunto: RE:[ntdev] Problem with opening file in system32.

I found that \SystemRoot this is not availble in namespace when my boot
start drivr try to open file so the status code
STATUS_OBJECT_PATH_NOT_FOUND. Bot you can use it afterword. eg. I have
used it in shutdown notification.


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

It probably won’t matter. There’s no guarantee that the disk stacks have started when his driver loads.

There’s another type of notification (I can’t remember the name offhand) that you can register for that will get you called back after the boot disk is online.

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Fernando Roberto
Sent: Thursday, August 23, 2007 6:07 AM
To: Windows System Software Devs Interest List
Subject: RES: [ntdev] Problem with opening file in system32.

You could use the value “SystemPartition” stored in
HKEY_LOCAL_MACHINE\SYSTEM\Setup to build the full path

\Device\HarddiskVolume2\Windows\System32\abc.txt

s,

Fernando Roberto da Silva
DriverEntry Kernel Development
http://www.driverentry.com.br

-----Mensagem original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Em nome de
xxxxx@yahoo.com
Enviada em: quinta-feira, 23 de agosto de 2007 09:55
Para: Windows System Software Devs Interest List
Assunto: RE:[ntdev] Problem with opening file in system32.

I found that \SystemRoot this is not availble in namespace when my boot
start drivr try to open file so the status code
STATUS_OBJECT_PATH_NOT_FOUND. Bot you can use it afterword. eg. I have
used it in shutdown notification.


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

I believe the notification is IoRegisterBootDriverReinitialization.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

“Peter Wieland” wrote in message
news:xxxxx@ntdev…
It probably won’t matter. There’s no guarantee that the disk stacks have
started when his driver loads.

There’s another type of notification (I can’t remember the name offhand)
that you can register for that will get you called back after the boot disk
is online.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Fernando Roberto
Sent: Thursday, August 23, 2007 6:07 AM
To: Windows System Software Devs Interest List
Subject: RES: [ntdev] Problem with opening file in system32.

You could use the value “SystemPartition” stored in
HKEY_LOCAL_MACHINE\SYSTEM\Setup to build the full path

\Device\HarddiskVolume2\Windows\System32\abc.txt

s,

Fernando Roberto da Silva
DriverEntry Kernel Development
http://www.driverentry.com.br

-----Mensagem original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Em nome de
xxxxx@yahoo.com
Enviada em: quinta-feira, 23 de agosto de 2007 09:55
Para: Windows System Software Devs Interest List
Assunto: RE:[ntdev] Problem with opening file in system32.

I found that \SystemRoot this is not availble in namespace when my boot
start drivr try to open file so the status code
STATUS_OBJECT_PATH_NOT_FOUND. Bot you can use it afterword. eg. I have
used it in shutdown notification.


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

Thank you Don.

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Thursday, August 23, 2007 8:53 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Problem with opening file in system32.

I believe the notification is IoRegisterBootDriverReinitialization.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

“Peter Wieland” wrote in message
news:xxxxx@ntdev…
It probably won’t matter. There’s no guarantee that the disk stacks have
started when his driver loads.

There’s another type of notification (I can’t remember the name offhand)
that you can register for that will get you called back after the boot disk
is online.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Fernando Roberto
Sent: Thursday, August 23, 2007 6:07 AM
To: Windows System Software Devs Interest List
Subject: RES: [ntdev] Problem with opening file in system32.

You could use the value “SystemPartition” stored in
HKEY_LOCAL_MACHINE\SYSTEM\Setup to build the full path

\Device\HarddiskVolume2\Windows\System32\abc.txt

s,

Fernando Roberto da Silva
DriverEntry Kernel Development
http://www.driverentry.com.br

-----Mensagem original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Em nome de
xxxxx@yahoo.com
Enviada em: quinta-feira, 23 de agosto de 2007 09:55
Para: Windows System Software Devs Interest List
Assunto: RE:[ntdev] Problem with opening file in system32.

I found that \SystemRoot this is not availble in namespace when my boot
start drivr try to open file so the status code
STATUS_OBJECT_PATH_NOT_FOUND. Bot you can use it afterword. eg. I have
used it in shutdown notification.


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


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

You cannot read any files from the init paths of the boot start driver.

Make your driver System start, or delay the file loading till driver
reinitialization phase, or use SYSTEM registry instead of files.


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

wrote in message news:xxxxx@ntdev…
> Hi All,
>
> I am reading a file in eg. system32\abc.dat in my bootstart driver for that I
am using L"\SystemRoot\System32\abc.dat" path but ZwCreateFile fails with
status code STATUS_OBJECT_PATH_NOT_FOUND. What will be the problem?
>
> Thanks & Regards,
> Amit.
>