.NET: How do I find the Desktop path when Folder Redirection is on?
.net
Solution
You need to use the DesktopDirectory special folder instead:
`Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)`
should give you the redirected directory.
Problem
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