Hi,
I have a driver that works well in WinXP. In this driver, device property
page write some information in systemroot directory. (just like logging
files). But in Vista, the property page fails to write because it has no
authority, so some relative feature can't work.

1. I've tried to change the writing file to non-system directory, but I
found that INF failed to use dirIDs failed.

[DestinationDirs]
CopyFiles.ProperPageLog = 53, VendorDir ;try to copy to user profile
directory

the 53 dirID works in winXP but no in Vista, I've tried "25 (Shared
Directory)", "16427 (Program Files\Common)"...they all fail in Vista.


2. another question, if I copy the files in installation package, how to
access this diretory in dirver (ex. "16427 Program Files\Common")? As far as
know, the \\SystemRoot refer to "c:\windows", but can't access other
directory. I think absolute directory like \\dosdevices\\c:\\ is bad idea.


I'm not sure I'm in right way, please help me and thanks!

Re: fail to write files in SystemRoot in Vista by Maxim

Maxim
Mon Mar 26 05:03:04 CDT 2007

> I have a driver that works well in WinXP. In this driver, device property
> page write some information in systemroot directory. (just like logging
> files).

Can you use ETW or Windows event log for logging, and registry for settings, to
avoid the need of these files?

> access this diretory in dirver (ex. "16427 Program Files\Common")? As far as
> know, the \\SystemRoot refer to "c:\windows", but can't access other
> directory. I think absolute directory like \\dosdevices\\c:\\ is bad idea.

Accessing "Program Files" from a driver is also a bad idea.

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