Re: Problem with Windows 7 Libraries
On Tue, 01 Sep 2009 06:03:02 -0700, Marc Allard <marc@nospam.allcomp.be>
wrote:
Does any one have an idea?
Am I in the managed MSDN forums? or did I choose a wrong option?
If you have an MSDN subscription, I think maybe this is no longer the
right forum. Microsoft used to answer MSDN subscriber questions here, but
I seem to recall seeing a recent message saying that they'd moved their
managed support over to a web-based forum. Sorry I don't have more
specifics about that.
As for your question, I believe that your problem is probably more user
error than anything else. I've tested and verified that when I change the
"My Documents" location, the .NET
Environment.GetFolderPath(SpecialFolder.MyDocuments) as well as the
VB-specific FileSystem.SpecialDirectories.MyDocuments both return the
correct folder location. (See below for a concise-but-complete code
example).
So, I can only conclude that you are not actually changing your "My
Documents" folder correctly.
In Windows 7, you need to expand the "Documents" item in the navigation
pane, right-click on the "My Documents" item, choose "Properties" and then
go to the "Location" tab in the "Properties" dialog. There, you can click
the "Move..." button to change the location of that special folder.
If the above information does not help, then you need to post a more
specific question. Post a concise-but-complete code example that shows
exactly how you're retrieving the "My Documents" folder path, as well as a
clear, specific description of how you're changing "the My Documents
libraries" in Windows Explorer.
Pete
using System;
using Microsoft.VisualBasic.Devices;
namespace TestDocumentsSpecialFolder
{
class Program
{
static void Main(string[] args)
{
// The .NET way:
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
// The VB way:
Computer computer = new Computer();
Console.WriteLine(computer.FileSystem.SpecialDirectories.MyDocuments);
}
}
}