How to programmatically derive Windows Downloads folder “%USERPROFILE%/Downloads”?

Yes it is special, discovering the name of this folder didn’t become possible until Vista. .NET still needs to support prior operating systems. You can pinvoke SHGetKnownFolderPath() to bypass this limitation, like this: using System.Runtime.InteropServices; … public static string GetDownloadsPath() { if (Environment.OSVersion.Version.Major < 6) throw new NotSupportedException(); IntPtr pathPtr = IntPtr.Zero; try { SHGetKnownFolderPath(ref … Read more

Does Windows 7 restrict folder access as Vista does?

It’s not a “problem”, it’s a feature. It’s called User Account Control (UAC), and it’s one of the ways that system security was tightened under Windows Vista. Windows 7 indeed retains a similar security model. There’s absolutely no reason that your application should need to mess with system folders in the first place. As you’ve … Read more