Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

Any way to get home directories of all user's on a windows system

Hi All,

Is there any way to get home directories of all user accounts on Windows machine.

by default they are under: C:\Documents and Settings\<account name>.

Any help will be greatly appreciated.

Regards,
0
nkanand
Asked:
nkanand
  • 2
  • 2
1 Solution
 
nkanandAuthor Commented:
I would like a C++/C way to get this info from the OS Please.
0
 
mattisflonesCommented:
First of all, use the appropriate TA:
http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/
Or:
http://www.experts-exchange.com/Programming/Programming_Languages/C/

And then give me points for the help.. ;-) or ask in CS for a deletion of this question..
http://www.experts-exchange.com/Community_Support/
0
 
nkanandAuthor Commented:
Hi mattisflones,

Sorry for the confusion.

My topic is basically a Windows Security Question, hence I found this place to be most appropriate one.

0
 
mattisflonesCommented:
:-) Ok, just tought that the guys in those TAs would know this and give you the answer faster.. opt#2 is to post a pointer in one of those TAs to this Q...
Now, ill get off your back! Good luck..
0
 
Phil_AgcaoiliCommented:
Why C/C++/C# again?

Are you doing this from a local machine or over the network?

Eitherway, use this...

#THIS CREATES A EXECUTABLE FILE
edit test.bat

#ADD THE FOLLOWING LINE AND FILE-->SAVE-->EXIT
dir/b "c:\Documents and Settings"

At a cmd prompt, type
test.bat

This will dump a list of users' home directories as you requested.

If you want to do this over the network, simplay add:
\\[Name of System\c$\Documents and Settings\

You don't need C to do this.

Hope this helps.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now