Gordon said:
<sigh> In Vista "Documents and Settings" is a JUNCTION POINT - it doesn't
contain anything that the OP could a) understand or b) do anything with.
It's a POINTER to the Vista folder of C:\Users\{account name}\Documents,
for the use of legacy applications that use the XP folder designation.
If you have had experience with *nix then it's like a symbolic link.
Windows Vista Junction Points:
http://www.svrops.com/svrops/articles/jpoints.htm
You are implying that there is nothing in C:\Users\{account name}\Documents
that a user could a) understand or b) do anything with.
Microsoft should either not show the Documents and Settings directory (the
junction point that looks like a directory) or allow access to it. The way
it is done is clearly extremely confusing.
Programs written the way Microsoft recommends would not be affected by the
change. The following VBScript produces "C:\Users\Sam\Documents" for me.
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo WshShell.SpecialFolders("MyDocuments")
How would a "legacy application" use "Documents and Settings"? The following
VBScript (a slightly modified version of the sample in the FolderItems.Items
documentation) reports that there are 0 items in my "My Documents" folder.
fnFolderObjectItemsVB "C:\Documents and Settings\Sam\My Documents"
function fnFolderObjectItemsVB(foldername)
dim objShell
dim objFolder
set objShell = CreateObject("Shell.Application")
set objFolder = objShell.NameSpace(foldername)
if (not objFolder is nothing) then
dim objFolderItems
WScript.Echo objFolder.title
set objFolderItems = objFolder.Items
if (not objFolderItems Is Nothing) then
WScript.Echo objFolderItems.Count
end if
set objFolderItem = nothing
end if
set objFolder = nothing
set objShell = nothing
end function