I have a windows service running on my machine. How can I get MyDocuments folders of each users?
For example:
For Windows XP I must get list:
- C:\Documents and Settings\User1\My Documents
- C:\Documents and Settings\User2\My Documents
- ...
For Windows 10 I must get list:
C:\Users\User1\Documents\
C:\Users\User2\Documents\
...
How can I get these lists ?
I would suggest using this solution and then just enumerate folders ( for each user ).