Explorer folder views

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!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KrugarAuthor Commented:
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?


Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

KrugarAuthor Commented:
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.

KrugarAuthor Commented:
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 :)

PAQed, 250 refunded.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.