4

I have been using

Environment.GetFolderPath(Environment.SpecialFolder.Desktop)

to get the path to the user's desktop for ages now, but since we changed our setup here at work so we use Folder Redirection to map our users' Desktop and My Documents folders to the server, it no-longer works. It still points to the Desktop folder in C:\Documents and Settings, which is not where my desktop lives.

Any ideas on how to fix this?

Burns

1 Answer 1

9

You need to use the DesktopDirectory special folder instead:

Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)

should give you the redirected directory.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.