|
-
May 29th, 2008, 11:15 AM
#1
Document and settings/<userid> path
Hello,
I need to know the best way to get the Documents and settings/<userid> path in C#. I have googled a bit and not found what I need.
Is there a better way that using; System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) and then removing the last directory name?
Thanks
-
May 29th, 2008, 01:14 PM
#2
Re: Document and settings/<userid> path
Code:
string userFolder = "C:\\Documents and Settings\\" + Environment.UserName;
Provided the folder is the same as their username, it would "work"... Other than that, I couldn't find any builtin function to retrieve exactly what you're looking for.
-
May 29th, 2008, 01:42 PM
#3
Re: Document and settings/<userid> path
Thank you, at least im not missing anything obvious and your idea was simpler than mine :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|