Find the users-home-folders from within a driver

V

Viv

Hi all,

How can I find out from within a driver the paths to all the
home-folders for all users from the system (should work on Win2k, XP,
Vista and Win7)?

I mean how can I get for instance on a Windows Vista, from a driver
(which obviously runs in kernel mode), the folder:
C:\Users or C:\Users\<username>; or on a WinXP the C:\Documents and
Settings or C:\Documents and Settings\<username>?

Thanks,
Viv
 
M

Maxim S. Shatskih

How can I find out from within a driver the paths to all the
home-folders for all users from the system (should work on Win2k, XP,
Vista and Win7)?

Why do you need this? maybe it is better to get this information in user mode and send it to the driver?

Do not use hardcoded paths, they can be customized.
 
T

Tim Roberts

Viv said:
How can I find out from within a driver the paths to all the
home-folders for all users from the system (should work on Win2k, XP,
Vista and Win7)?

I mean how can I get for instance on a Windows Vista, from a driver
(which obviously runs in kernel mode), the folder:
C:\Users or C:\Users\<username>; or on a WinXP the C:\Documents and
Settings or C:\Documents and Settings\<username>?

To a great extent, the whole concept of "users" is a user-mode concept.
It's never going to be a good fit to try to do this from the kernel.

Remember that, in many environments, those paths point to network shares,
which a kernel driver cannot easily access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top