Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Find the users-home-folders from within a driver

Reply
Thread Tools Display Modes

Find the users-home-folders from within a driver

 
 
Viv
Guest
Posts: n/a

 
      05-12-2010
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
 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      05-12-2010
> 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.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      05-13-2010

Viv <> wrote:
>
>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.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Richard Lewis Haggard
Guest
Posts: n/a

 
      06-09-2010
The registry contains a restricted access path to a key that contains a list
of user names.

HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\N ames

If you start up RegEdit and Navigate to HKEY_LOCAL_MACHINE\SAM\SAM, right
click and give yourself access (normally, the system has access below SAM but
an admin user does not), kill RegEdit and restart, you can start looking at
the users that the machine knows about.

The whole SAM mechanism encapsulates information about a user, name,
password, last time logged on, how many failed log on attempts, rights, group
membership and so on. The majority of this information is encrypted but a lot
of the info on how it works is out there on the net. In your case, you are
just looking for names and so you could do something like, get the operating
system determine where the user root is, iterate over that directory and
match the results up with the SAM names.
===
Richard Lewis Haggard


"Tim Roberts" wrote:

> Viv <> wrote:
> >
> >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.
> --
> Tim Roberts,
> Providenza & Boekelheide, Inc.
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SBS 2008 AD Users and Computers Snap-in MSVCRT.DLL odd fault NickM Windows Small Business Server 3 11-28-2009 12:40 PM
Win 7 Lost My Email Contacts frankphelps Windows Live Mail 32 11-23-2009 02:19 AM
UAC should have been a Business class feature, not for Home Users JD Wohlever Windows Vista Games 106 05-02-2008 12:00 AM
UAC should have been a Business class feature, not for Home Users JD Wohlever Windows Vista Installation 109 04-14-2008 06:28 PM
BUGCODE_USB_DRIVER with external USB HDD PHILIPS Deathwing00 Windows Vista Hardware 11 06-15-2007 07:02 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59