Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Windows XP Explorer display

Reply
 
Old 08-13-2008   #1 (permalink)
Ildhund


 
 

Windows XP Explorer display

Does anyone know of a way to customize the columns shown in Windows
Explorer in XP when a folder is selected? The default for document
folders is Name, Size, Type and Date modified, but I would like to
be able to specify (in a script I'm working on), say, Name, Author,
Subject. SendKeys can't do it. Is this possible?
--
Noel


My System SpecsSystem Spec
Old 08-14-2008   #2 (permalink)
mr_unreliable


 
 

Re: Windows XP Explorer display

Ildhund wrote:
Quote:

> I would like Windows Explorer column headers to be:
> Name, Author, Subject. SendKeys can't do it. Is this possible?
hi Ildhund,

As best I can tell, you can't do that from script.

If you are willing to write your own "explorer" in
vb, then yes, you could place anything in the columns
that you want. There are many examples of roll-yer-own
explorers on the usual vb source code sites.

If you wish to stick to script, you could make up an
hta (i.e., a webbrowser gui) showing a "listbox" (i.g.,
a table tag, or else a listbox object borrowed from vb)
with any columns you want.

As far as the contents of the table, (name, author, subject)
that sounds like you are listing ms word documents (or maybe
wordperfect?). Anyway, to list those attributes you are
going to have to use the word.application object to open
each document one-at-a-time, and retrieve those attributes
for your listing.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)
My System SpecsSystem Spec
Old 08-15-2008   #3 (permalink)
Ildhund


 
 

Re: Windows XP Explorer display

Thanks, jw. It seems odd that such a powerful tool as Explorer is
should not be more easily configurable. No, it's not documents I'm
trying to view, but .eml and .nws emails and newsgroup posts. There
are 66,000 files in 400 folders, and applying views to 400 folders
manually is not a task I'd wish to embark on. You can't even apply a
setting and then elect to apply it to subfolders - it's all or
nothing.
--
Noel

"mr_unreliable" <kindlyReplyToNewsgroup@xxxxxx> wrote in
message news:#$pZRyi$IHA.2244@xxxxxx
Quote:

> Ildhund wrote:
Quote:

>> I would like Windows Explorer column headers to be: Name, Author,
>> Subject. SendKeys can't do it. Is this possible?
>
> hi Ildhund,
>
> As best I can tell, you can't do that from script.
>
> If you are willing to write your own "explorer" in
> vb, then yes, you could place anything in the columns
> that you want. There are many examples of roll-yer-own
> explorers on the usual vb source code sites.
>
> If you wish to stick to script, you could make up an
> hta (i.e., a webbrowser gui) showing a "listbox" (i.g.,
> a table tag, or else a listbox object borrowed from vb)
> with any columns you want.
>
> As far as the contents of the table, (name, author, subject)
> that sounds like you are listing ms word documents (or maybe
> wordperfect?). Anyway, to list those attributes you are
> going to have to use the word.application object to open
> each document one-at-a-time, and retrieve those attributes
> for your listing.
>
> cheers, jw
> ____________________________________________________________
>
> You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
> the answers will be applicable to the questions)
My System SpecsSystem Spec
Old 08-15-2008   #4 (permalink)
mayayana


 
 

Re: Windows XP Explorer display

I'm not sure whether this will provide what you need,
but you can take a look:

www.jsware.net/jsware/xpfix.php5

See the Folder Fix download. To make a long
story hopefully tolerable:

I like to use Win98 but have been preparing for a
probable, eventual move to Windows Xtra Problems.
One of the extra problems with XP is that Webview/
Active Desktop was removed and I could no longer
control folder window size. Windows seems to have
some sort of arbitrary formula that results in giant
folder windows being displayed, regardless of the size
they were when closed.

I agree with you that the Explorer configuration
options are surprisingly limited. Given that Explorer is
the basic connection between a person and their
PC, it's always been surprisingly neglected. (And it's
worse than ever in XP, with the nearly useless
"Common Tasks" bar filling up the left-side panel that
used to be customizable. It appears that MS doesn't
want to keep supporting customization because the
they want the the Windows GUI to be consistent for
"branding" purposes. Maybe we'll get lucky and someone
will port KDE to Windows one of these days.

It turns out that the system seems to be broken. There
are actually settings to control and remember things like
folder window size, but Explorer doesn't record them properly,
so the settings normally don't work.

Sorry to be so long-winded here. I'm trying to fill
you in on where the above-linked download will take
you. I wrote the XP Folder Fix package in order to have
a way to choose the size of allXP folder windows. It's a
VBS-powered HTA for setting the size and view of all
previously-opened folders on XP. What it does is to go
through the entire Registry key that contains the folder
subkeys (one for each previously-opened folder), and fixes
the settings in each key so that Explorer will pay attention
to them. (I don't know of any way to tell Explorer what
to do with folders that have never been opened, other
than inventing a new previously-opened subkey.) The HTA
includes an explanation of how the whole thing works.

As for the columns, I haven't dealt with this for awhile,
but if memory serves I *think* there is a binary key for
each folder that stores the column choices. If so, you
could use the information and code in the Folder Fix HTA
to write a script that will change any number of column
settings, perhaps by setting one folder the way you want
it and then copying the resulting Registry value over to
other Registry keys.

I can't tell you the specific value storing the column data
in each Folder. None of this is fresh in my mind. If you don't
find the setting obvious in the Registry
you might try just going to "View" -> "Choose Details" in
a folder window, then select new details, then run Regmon
and see what gets written to the Registry when you save
the new settings. (Be warned, though -- Microsoft is inexplicably
sloppy with the Registry. You may see *THOUSANDS* of
Registry calls when you close the settings window, as Explorer
writes and rewrites the same values over, and over, and over
again.)

The other issue you may need to deal with is finding
folder/key correspondences. If you want to set 400 folders,
but don't want
to set other folders, then you'll need to work out which
Registry keys go to which folders. That's also an awkward
task. There is a Registry setting that indicates the folder
corresponding to a key, but in typical MS fashion they chose
to save it as a discombobulated binary string. There seems
to be a fair amount of rubbish in the binary value, with
the actual folder path then saved in short path(!) format
within that rubbish.

Good luck.





My System SpecsSystem Spec
Old 08-15-2008   #5 (permalink)
mayayana


 
 

Re: Windows XP Explorer display


Some further explanation about how folder display info. is
stored:

In the XP Registry is this key:

HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU

Under that key are subkeys that represent top-level folders.
Under those are the subfolder keys. The keys under BagMRU
have a value NodeSlot, which has numeric data pointing to a
key under:

HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags

Each key with subfolder subkeys will also have numeric values
that have binary data naming a subfolder. The subkey name
that matches that value then has its own NodeSlot value,
pointing to the Bags subkeys. The Bags subkeys are the ones
that actually contain settings for specific folders.
(Remember these are all folders that have been opened
at some point.)

It's all very confusing, and the names of keys and values
are, for the most part, idiotic. But an example will help to
clarify it. On an XP system, I go to the key:

HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU\

The top subkey is named "0".
The "0" subkey has values named 0 to 15, with corresponding
subkeys named 0 to 15. If I open the key BagMRU\0\ and look
at the binary data in the value named "1", I clearly see "C:\".
I then open the subkey BagMRU\0\1\. The "1" subkey also has a
number of numeric subkeys, representing subfolders on C drive.
It has a NodeSlot value of 16.

Now I open the key:
HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags\

I look for the subkey named with the number 16. I then click
on the Shell subkey there. So I'm in:
HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags\16\Shell\

Finally, I've reached the settings for the C:\ Explorer folder!

So the keys under BagMRU represent folder trees of previously
opened folders, with each key pointing to its settings key under
the Bags key (via the NodeSlot value) and also naming its own
subfolders (via the numericly-named values that match numericly
-named subkeys).

Now, in order to confirm what I just did, I change/add the
following settings, which will affect folder window size for
this folder when display is set to 1024x768:

HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags\16\Shell\
value: WinPos1024x768(1).top data: 0
value: WinPos1024x768(1).left data: 0
value: WinPos1024x768(1).bottom data: 200
value: WinPos1024x768(1).right data: 200

I then click a Desktop C drive link in Explorer and sure enough,
I'm looking at a tiny, 200-pixel-square folder window with room
only for the toolbar, and it's appearing in the upper
left corner of the screen. (The reason folder size choices normally
don't work is because Explorer will read these settings but it
never saves them. So aside from this kind of abstruse tweaking
that whole part of the system is useless!)

Next I export the key. Then I open the C drive folder again
and open the Choose Details window. I uncheck "Type" and
Check "Attributes" (since the Type column contains basically
useless information . I then export the key again and check
the value for ColInfo. Before the column changes it's:

"ColInfo"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,fd,df,df,fd,0f
,\

00,04,00,20,00,10,00,00,00,28,00,00,00,00,00,01,00,00,00,02,00,00,00,03,00,\

00,00,b4,00,60,00,78,00,78,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

After the column changes it's:

"ColInfo"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,fd,df,df,fd,0f
,\

00,04,00,20,00,10,00,28,00,3c,00,00,00,00,00,01,00,00,00,02,00,00,00,03,00,\

00,00,b4,00,60,00,78,00,3c,00,00,00,00,00,01,00,00,00,03,00,00,00,06,00,00,\

00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

So all you have to do is to parse all of those BagMRU
values to find your folders, then get the NodeSlot value for each,
find the Bags subkey with a name that matches the NodeSlot
number, then go down to the Shell subkey and write your
ColInfo binary data array... Piece o' cake!

The only catch is that the numeric values (non-NodeSlot --
the ones that have the folder names) in the BagMRU subkeys have
very funky data. They contain binary data formatted like so:

garbage
folder name as short DOS version in ansi format
garbage
folder name in unicode format
garbage

You'll need to work out how to filter the actual folder name from
the garbage so that you can walk the BagsMRU subkeys and
match up the Bags subkeys with your folders.

(If you work it all out perhaps you could post the result here.
It might save a few other people from having to slog through
the mess. It's hard for Microsoft to surprise me when it
comes to overly-complex, poorly-designed, excessively-abstruse
software, but this Explorer/Registry mess comes close.




My System SpecsSystem Spec
Old 08-16-2008   #6 (permalink)
Ildhund


 
 

Re: Windows XP Explorer display

Thanks, Joe, for reading material for the next few weeks. I really
appreciate your efforts to help.
I've also been doing a bit of Google research: this looked
promising: http://www.xs4all.nl/~hwiegman/desktopini.html
but again, there's a lot to digest, and I haven't yet unearthed
where (if at all) the HTT file can define the columns in the view.
This is a 'hobby' project which might well turn out to have been a
complete waste of time when a new version of Windows Live Mail is
released next month. It could well be that the functions I'm trying
to script will have been incorporated in the app's code. Still, I'll
have learnt quite a bit about scripting. I'll let you know if
anything comes out of all this.
Thanks again, and sorry if the top post offends, but I didn't think
this response warranted scrolling through all your pearls.
--
Noel

"mayayana" <mayaXXyana@xxxxxx> wrote in message
news:#43i#bx$IHA.3756@xxxxxx
Quote:

>
> Some further explanation about how folder display info. is
> stored:
>
> In the XP Registry is this key:
>
> HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU
>
> Under that key are subkeys that represent top-level folders.
> Under those are the subfolder keys. The keys under BagMRU
> have a value NodeSlot, which has numeric data pointing to a
> key under:
>
> HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags
>
> Each key with subfolder subkeys will also have numeric values
> that have binary data naming a subfolder. The subkey name
> that matches that value then has its own NodeSlot value,
> pointing to the Bags subkeys. The Bags subkeys are the ones
> that actually contain settings for specific folders.
> (Remember these are all folders that have been opened
> at some point.)
>
> It's all very confusing, and the names of keys and values
> are, for the most part, idiotic. But an example will help to
> clarify it. On an XP system, I go to the key:
>
> HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU\
>
> The top subkey is named "0".
> The "0" subkey has values named 0 to 15, with corresponding
> subkeys named 0 to 15. If I open the key BagMRU\0\ and look
> at the binary data in the value named "1", I clearly see "C:\".
> I then open the subkey BagMRU\0\1\. The "1" subkey also has a
> number of numeric subkeys, representing subfolders on C drive.
> It has a NodeSlot value of 16.
>
> Now I open the key:
> HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags\
>
> I look for the subkey named with the number 16. I then click
> on the Shell subkey there. So I'm in:
> HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags\16\Shell\
>
> Finally, I've reached the settings for the C:\ Explorer folder!
>
> So the keys under BagMRU represent folder trees of previously
> opened folders, with each key pointing to its settings key under
> the Bags key (via the NodeSlot value) and also naming its own
> subfolders (via the numericly-named values that match numericly
> -named subkeys).
>
> Now, in order to confirm what I just did, I change/add the
> following settings, which will affect folder window size for
> this folder when display is set to 1024x768:
>
> HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags\16\Shell\
> value: WinPos1024x768(1).top data: 0
> value: WinPos1024x768(1).left data: 0
> value: WinPos1024x768(1).bottom data: 200
> value: WinPos1024x768(1).right data: 200
>
> I then click a Desktop C drive link in Explorer and sure enough,
> I'm looking at a tiny, 200-pixel-square folder window with room
> only for the toolbar, and it's appearing in the upper
> left corner of the screen. (The reason folder size choices
> normally
> don't work is because Explorer will read these settings but it
> never saves them. So aside from this kind of abstruse tweaking
> that whole part of the system is useless!)
>
> Next I export the key. Then I open the C drive folder again
> and open the Choose Details window. I uncheck "Type" and
> Check "Attributes" (since the Type column contains basically
> useless information . I then export the key again and check
> the value for ColInfo. Before the column changes it's:
>
> "ColInfo"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,fd,df,df,fd,0f
> ,\
>
> 00,04,00,20,00,10,00,00,00,28,00,00,00,00,00,01,00,00,00,02,00,00,00,03,00,\
>
> 00,00,b4,00,60,00,78,00,78,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
>
> After the column changes it's:
>
> "ColInfo"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,fd,df,df,fd,0f
> ,\
>
> 00,04,00,20,00,10,00,28,00,3c,00,00,00,00,00,01,00,00,00,02,00,00,00,03,00,\
>
> 00,00,b4,00,60,00,78,00,3c,00,00,00,00,00,01,00,00,00,03,00,00,00,06,00,00,\
>
> 00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
>
> So all you have to do is to parse all of those BagMRU
> values to find your folders, then get the NodeSlot value for each,
> find the Bags subkey with a name that matches the NodeSlot
> number, then go down to the Shell subkey and write your
> ColInfo binary data array... Piece o' cake!
>
> The only catch is that the numeric values (non-NodeSlot --
> the ones that have the folder names) in the BagMRU subkeys have
> very funky data. They contain binary data formatted like so:
>
> garbage
> folder name as short DOS version in ansi format
> garbage
> folder name in unicode format
> garbage
>
> You'll need to work out how to filter the actual folder name from
> the garbage so that you can walk the BagsMRU subkeys and
> match up the Bags subkeys with your folders.
>
> (If you work it all out perhaps you could post the result here.
> It might save a few other people from having to slog through
> the mess. It's hard for Microsoft to surprise me when it
> comes to overly-complex, poorly-designed, excessively-abstruse
> software, but this Explorer/Registry mess comes close.
>
>
>
>
My System SpecsSystem Spec
Old 08-16-2008   #7 (permalink)
mayayana


 
 

Re: Windows XP Explorer display

Quote:

> Thanks, Joe, for reading material for the next few weeks.
You're welcome. It IS a great deal of info. to
figure out.
Quote:

> promising: http://www.xs4all.nl/~hwiegman/desktopini.html
> but again, there's a lot to digest, and I haven't yet unearthed
> where (if at all) the HTT file can define the columns in the view.
I think the desktop.ini is fairly limited. It can show an
icon or turn the whole window into something else (the
way that the IE cache folder does), but doesn't deal with
window customizing.
On pre-XP systems you can customize
the entire folder window content, systemwide, with a folder.htt
file because it's actually a webpage in a browser window, but in
XP that "Webview" was removed. There's still some ability to
use a folder.htt in individual folders, but you have to "jump
through hoops" and I don't know how much XP can actually do.

Folder.htt creator utility:
www.jsware.net/jsware/jsfv.php5#ftg

Info. about folder.htt on XP:
http://support.microsoft.com/kb/819028
http://www.virtualplastic.net/html/wv_main.html

Even in pre-XP, however, that doesn't get you access
to what you want. The sub-window displaying files is actually
a system ListView control. On pre-XP it's essentially an
ActiveX control sited on a webpage, visible to script as
a ShellFolderView object. On XP it's still acceessed as a
ShellFolderView object. That object is very limited. It
was designed to provide only the basic functions that
Explorer needs in a folder. (SelectedItems collection,
SelectItem method, etc.) It actually has a ViewOptions
property but that just reflects some of the choices available
in the system Folder Options dialogue. As far as I
know, the Shell.Application, ShellFolderView, etc. don't provide
any wrapper object to access the actual ListView control
(the file list display) on any Windows version.

The whole "Shell" issue is intriguing to me because it's so
much connected with actual Windows appearance and,
as MS likes to say, the Windows "experience". Oddly, though,
there's not a lot of documentation and, as you've found out,
not a lot of control. Microsoft seems to have never really
given it much thought. The Webview approach was great
because it allowed a great deal of customizing, but MS mostly
did that, I think, as part of their battle with Netscape --
tying IE inextricably into Windows. (On pre-XP the folder
content other than the "chrome" actually is an IE browser
window.) Even though Webview was there, MS only used it
to put a silly logo and a thumbnail on the left side of folders.
And they never really documented it. You could click "Customize
this folder" and Windows would just open C:\Windows\Web\folder.htt
in Notepad, with no explanation!

Now, in XP, the left side is
the Common Tasks panel, which is notably uninspired. It's
mostly used just to display clever drop-down panels and
gradients to decorate the folder window. They finally got
around to adding links to other folders (one of the more
useful things that can be done in Webview) but there are
just a few, unconfigurable links and they keep changing.
From one window maybe you can get to Control Panel, but
that link might be missing in another window!

Woops. I ended up posting a big load of info. again.
Quote:

> Thanks again, and sorry if the top post offends
I generally top-post. Whatever. As far as I know it's
only a small percentage of bottom-posters (and most of
those cranky Linux people who regard it as a quasi-
religious issue.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Re: Windows Explorer Display Settings Won't stick?! Vista General
Windows Explorer Display Settings Won't stick?! Vista General
Change default display in Windows Explorer Vista General
Display mode in windows explorer? Vista music pictures video
Display of Windows Explorer Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46