Solved

Explorer folder views

Posted on 2003-11-24
9
506 Views
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!
0
Comment
Question by:Krugar
  • 4
  • 3
9 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9813712
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9813736
0
 

Author Comment

by:Krugar
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?

Cheers!

0
 
LVL 24

Expert Comment

by:shivsa
ID: 9823259
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Krugar
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:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Settings
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults\{F3364BA0-65B9-11CE-A9BA-00AA004AE837}

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.

Cheers!
0
 
LVL 24

Expert Comment

by:shivsa
ID: 10317783
PAQ/refund.
0
 

Author Comment

by:Krugar
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 :)

Cheers!
0
 
LVL 2

Accepted Solution

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

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
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…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now