RES: SetFileAttributes in NT Native...

Did you try use “SystemPartition” value in
HKEY_LOCAL_MACHINE\SYSTEM\Setup key in order to get the device name of
system partition?

Like:
\Device\HarddiskVolume2

Thus, you can compose the name as follow:
\Device\HarddiskVolume2\Windows\System32\explore.exe

But remember that Windows can be installed in folders that not in
“Windows”, like “WinNT”.

Att,

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@uol.com.br
Enviada em: sexta-feira, 28 de setembro de 2007 10:26
Para: Windows System Software Devs Interest List
Assunto: RE:[ntdev] SetFileAttributes in NT Native…

How can I get the correct path ?


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

Using hardcoded paths is a bad idea. Windows may be installed in other directory or partition. If you want to access a file under Windows root, you can use SystemRoot symbolic link i.e. \SystemRoot\system32\… Even system32 alone could work but the last time I’ve used it was probably at NT4.

Do you realize you made one of the worst threads in past months? If I omit total losers, of course, which isn’t your case. You’re apparently able to code so why waste so much time and list bandwidth? You could write all necessary information in the very first post and get a good answer. Instead, you let us guess and ask the same questions again and again. We aren’t wizards and can’t guess what status code you’ve got and which function returned it. It is your responsibility to make a homework, get all necessary info and then phrase the question which could be answered.

Another thing: if you don’t quote part of previous posts, some of us have no idea to whom and what you answer. It is mailing list, anyway.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of xxxxx@uol.com.br[SMTP:xxxxx@uol.com.br]
Reply To: Windows System Software Devs Interest List
Sent: Friday, September 28, 2007 2:36 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] SetFileAttributes in NT Native…

In another computer, the path “\??\C:\Windows\System32\explore.exe” cause error 0xC0000033


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

Any problem with you ?
Look forum: http://www.osronline.com/showthread.cfm?link=117911

Maybe you dont receive all messages and you are talk more than necessary…

Thank you Fernando for your help

No, Michal posted there as well. Granted, my role in this one is no longer objective, having posted more times than I can count the same basic request. The only issue here, as I see it, is that you would not provide the information requested, over and over, for some reason.

Good luck,

mm