Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Explorer folder views

Posted on 2003-11-24
Medium Priority
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?


What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


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

Technology Partners: 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!

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Simple Linear Regression
Six Sigma Control Plans

722 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