Explorer folder views

Posted on 2003-11-24
Last Modified: 2010-08-05
Hi all,

I've been trying to figure this one out for a bit & I'm stumped.  What I need to do is write a VB6 program that will set windows explorer's default view.

For example:  If the user were to select View | Details & then go into Tools | Folder Options | Views & click on "Like Current Folder"  Everything should then be displayed in the Detailed format.

I need to write a program that will do that for the user.

I've managed to find  IShellView::SaveViewState(void) to save the settings for 1 folder, but I can't parse every folder on every drive.  I need to find out what Windows does when "Like Current Folder" is clicked & call it myself.  I suspect this is in Shell32.dll but I haven't found it yet.

The only other useful info I can pass along is the FOLDERVIEWMODE enum contains the folder views.

I'm not looking for complete code, a snippet of what to declair & an example of how to call it will do nicely.  The ultimate goal is to set the folder views to "Details" for anyone running the program.

Thanks in advance & Cheers!
Question by:Krugar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 24

Expert Comment

ID: 9813712
LVL 24

Expert Comment

ID: 9813736

Author Comment

ID: 9813785
Hi shivsa,

I may not be able to see this for looking, but are not both of those about MS Outlook folders?  AFAIK I can't use an outlook form for Windows Explorer, but I've never developped for Outlook ...

I'm certainly open to suggestion, I was hoping to find out what Windows calls when somebody clicks on "Like Current Folder", however my ultimate goal is to have all the systems defaulting to the "Details" view.  As long as I don't have to manually call each directory (I can already do this.).

Any ideas?


Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 9824710
Hi shivsa,

I read through the code you posted and I'm a bit confused by it.  Unless my C++ is off, the I can use IShellView class to change specific know windows and / or create new ones.

I need to change the default for all Explorer windows in W2K Pro, not window by window.   Besides the default StreamsMRU in W2K defines only 200 remebered window settings.  Most, if not all of my users have more than 200 directories.

I did finally find a way to do this by manipulating the following RegValues:


If you can tell me how the code you posted accomplishes the same, I'd rather use the OS to change the settings over hacking the registry.  (Changes should then be immediate instead of having to restart explorer.exe).

Anyway the reg hack does work, I'll leave the question open a bit to see if I've missed something in the C++ code or if somebody knows how to do the same via a windows call / api.

LVL 24

Expert Comment

ID: 10317783

Author Comment

ID: 10321853
Actually the reg keys above don't work for every system & don't always work on my test systems.  We ended up dropping this as a requirement & moving on.

I still don't know what windows does when somebody clicks the "Like Current Folder" button.  I'd love to find out, but now it's just a curosity.  This is the one that got away lol.

Thanks shivsa for trying :)


Accepted Solution

Lunchy earned 0 total points
ID: 10323754
PAQed, 250 refunded.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question