experchange > vb.* > vb.general.discussion

John K.Eason (01-01-70, 02:00 AM)
In article <pu9bhu$1rlv$1>, RobertJ (RobertJ)
wrote:

> *From:* RobertJ <RobertJ>
> *Date:* Wed, 5 Dec 2018 12:13:46 -0800
> > I just tried it), running
> > explorer.exe /root,"x:\some\path"
> > results in an explorer window showing the contents of the given
> > folder and the folder tree pane as well


Just found the original 'tips.txt' file from one of the cab files on my original
W95 CD. That example is wrong. It should be:

explorer.exe /e /root,"x:\some\path"

if you want the folder tree pane as well as the details pane. This is the full text
from the Exploder switches section:

[Windows Explorer Switches]
----------------------------
Windows Explorer switches are useful in creating rooted folders:

Explorer [/e][,/root,<object>][[,/select],<sub object>]

/e Use Explorer view (scope and results pane view). The default is Open
view (results in pane view only).
/root<object> Specify the object in the "normal" name space that is used
as the root (top level) of this Explorer/Folder (i.e., local path
or UNC name). The default is the Desktop).
/Select The parent folder opens and the specified object is selected.
<sub object> Specify the folder unless /select is used. The default is
the root.

Examples: Explorer /e, /root, \\Reports opens an Explorer window at \\Reports.

Explorer /select, C:\Windows\Calc.exe opens a folder at
C:\Windows (or activates one that is currently open) and
selects Calc.exe.
Explorer /e, /root, \\Source\Internal\Design\Users\David\Archive
opens a folder to the Archive folder above. This is a good
way to create a dedicated, remote, documents archive
folder. A link to this folder
(\\Source\Internal\Design\ Users\David\Archive) can then be
placed in the SendTo folder for quick routing of documents.
---------------------- end -------------------
This has worked for me right from W95 through to W7.
John K.Eason (01-01-70, 02:00 AM)
In article <pua4j4$jc$1>, mayayana (Mayayana) wrote:

[..]
> level of the treeviw if you want to restrict it, and you can
> pick the selected item, but neither of those options has
> much value.


Fair enough. I'm using W7 nowadays so can't check on XP which I believe the OP is
using.
RobertJ (12-04-18, 11:42 PM)
Is there a way to open Windows Explorer from VB6 such as:
Views = Details
Col Sort = Date

???
Mayayana (12-05-18, 02:52 AM)
"RobertJ" <RobertJ> wrote

| Is there a way to open Windows Explorer from VB6 such as:
| Views = Details
| Col Sort = Date
|

I doubt it. That's a user preference. If you can
do it the functionality should be somewhere in
the shell object (which is what MSDN calls it)
AKA ShellFolderView API. But that mainly represents
Explorer functionality. You can get a list (undependable)
of folder contents. you can get the currently
selected item. Things like that. But display options
are a Registry setting.
RobertJ (12-05-18, 03:05 AM)
Hmmm...

So maybe someone knows how to mess with the registry to get what I need.
I can optionally change it back to the current default.

I did search and find /flags for Shell Explorer.exe.
The /e flag is supposed to show the folder tree but it does not work on
Win XP Pro. Maybe on Win Vista + ???

e.g. I do /select & """"D:\"""" and get the file list for D:\ but no
folder tree.

I want an Explorer Window to allow the user to fiddle in there.

Unfortunately the MS links I found are dead pertaining to those /flags.
Wayback here I come.
Mayayana (12-05-18, 05:57 AM)
"RobertJ" <RobertJ> wrote

| So maybe someone knows how to mess with the registry to get what I need.
| I can optionally change it back to the current default.
|

Oh boy. Have I got some goodies for you. :)





Back in the 9x days I wrote code to create a custom
Explorer window with extra features. At that time an
Explorer folder was actually a webpage in an IE
window, with a listview control on it. Folder.htt was
that webpage. With XP it changed and I was
frustrated to find that I couldn't even get an
Explorer window to hold it's sizing. It turned out
that the Registry settings controlling that were
broken, and Microsoft *never* fixed them.

With Vista/7, MS broke things again, making frivolous,
unnecessary changes to the Registry settings. Just
enough so that anyone who figured out XP would have
their stuff break on Vista/7.

Anyway.... long story.... the details are on the
webpages above, in the files with the downloads, and in
the comments in code. The XP folder fix utility, for
instance, is an HTA with a VBScript. The HTA explains
things in the UI. The VBScript has extensive comments
explaining what might be best described as the
whackjob, nonsensical, whimsical, even playful mess
that Microsoft made out of the simple job of storing
specific folder settings in the Registry.

In general, you can access the settings for a specific
folder that's been opened, but that job in itself is very
complicated, the settings are complicated, and they
only apply to one specific screen resolution.

| I did search and find /flags for Shell Explorer.exe.
| The /e flag is supposed to show the folder tree but it does not work on
| Win XP Pro. Maybe on Win Vista + ???
|

I don't know about that. But even if there are such
options I don't think you'll find them for setting view
style.
Apd (12-05-18, 03:07 PM)
"Mayayana" wrote:
> Oh boy. Have I got some goodies for you. :)
>


Why do you say the NTP service is useless? Surely it's useful if you
want to keep your clock synchronized to a time server (it doesn't have
to be Microsoft's).
Arne Saknussemm (12-05-18, 05:22 PM)
:: On Tue, 4 Dec 2018 17:05:41 -0800
:: (microsoft.public.vb.general.discussion)
:: <pu7896$250t$1>
:: RobertJ <RobertJ> wrote:

> Unfortunately the MS links I found are dead pertaining to
> those /flags. Wayback here I come.


As for the flags, check this out



but I doubt it will solve your needs about view and ordering; yet (and
I just tried it), running

explorer.exe /root,"x:\some\path"

results in an explorer window showing the contents of the given folder
and the folder tree pane as well
Mayayana (12-05-18, 05:35 PM)
"Apd" <not> wrote

| Why do you say the NTP service is useless? Surely it's useful if you
| want to keep your clock synchronized to a time server (it doesn't have
| to be Microsoft's).
|

NTP? You mean W32Time? I guess it's a matter of
personal preference. I think anyone who decides to
adjust/cull services *must* understand them first
because there's no one-size-fits-all. That's what my
utility was meant to do: Provide basic background
and dependency info to help people trim services.
If W32Time is important to you then you might want
to keep it.

I thought of Windows Time as the most obvious example
of something that's not actually necessary. If you're doing
physics experiments then maybe you need atomic clock
accuracy. For most people, correcting a couple of minutes
every once in awhile is plenty. No one's going to miss a
doctor's appt over it. A lot of services are not necessary
for most people, but W32Time is one that no one actually
needs.

If I could have a "smart clock" on the wall, would I?
No. I think it's ridiculous. As is a $300 watch to measure
my pulse or a frig with a TV screen on the outside that
shows me a video of what's inside, so that I don't have
to open the door. But such a frig actually exists. And
people buy those watches. And people buy "smart" door
locks. And now those locks get hacked. Technology isn't
always a plus.

A second reason to disable Windows Time is because it's
one of a few services that need to call out. If you use a
firewall and want to block unauthorized outgoing, it helps
if you can eliminate any Windows service that needs to
go out, and block svchost. That stops an entire range of
uncontrolled processes going online. It also blocks MS
spyware. W32Time is one of the things that can put a hole
in that security. That's the context in which I mentioned
W32Time.
Some people can't have that security, or don't care.
If you must use DHCP, for example, then you'll need to
let svchost through. But if you want that security and
only W32Time is standing in your way.... I'd say it's a
frivolous service that's unnecessary.... I use that
approach to stop all outgoing on XP and 7. (I assume
it's not possible on Win10, as that seems to be built as
spyware at the core and Microsoft actually says so in
their TOS.)

But it is, of course, a matter of personal preference.
I'm sure somewhere, right now, there's a person
eyeing a leftover piece of pie through their Samsung TV
frig. screen and thinking that frig was their best investment
ever.... aside from, maybe, their 4 Amazon Echos. That's
their business. I'm not writing utilities for P. T. Barnum's
dream audience. They mostly shop Apple.

Either way, my point was that if people look through
their services list they'll probably see lots of things that
they have no use for.
GS (12-05-18, 08:03 PM)
> Is there a way to open Windows Explorer from VB6 such as:
> Views = Details
> Col Sort = Date
> ???


A long time ago I was looking for VB6 code to create/manage my own file
explorer. Ralph pointed me to a project by Brad Martinez that fit the need at
that time. Not sure where he hangs out these days or where you'll find his
samples, though.

I moved on to using the Shell Megapak foldervw.ocx and filevw.ocx from Sky
Software (now LogicNP) because it was much easier to program as a built-in
feature for my cnc files manager app.

Brad's sample was easily adaptable as a stand-alone custom file explorer but
was over-my-head to make it work inside another app as I just started learning
VB6 at the time; - glad I moved on, though, because the LogicNP OCXs are great
to have.
RobertJ (12-05-18, 10:13 PM)
And if you do

explorer.exe /root,"x:\"

what do you get? A folder tree ?

Are you on Win XP or what ?

Arne Saknussemm wrote:
[..]
RobertJ (12-05-18, 10:15 PM)
I was hoping to use a native Explorer.

I will take a peek at your offerings.

Thanks !

Mayayana wrote:
[..]
Apd (12-05-18, 10:18 PM)
"Mayayana" wrote:
> "Apd" wrote:
> | Why do you say the NTP service is useless? Surely it's useful if you
> | want to keep your clock synchronized to a time server (it doesn't have
> | to be Microsoft's).
> |
> NTP? You mean W32Time?


It's named NTP in your table of services (which appears to be the
service names of some well-known ports). W32Time uses Network Time
Protocol which uses port 123.

> I thought of Windows Time as the most obvious example
> of something that's not actually necessary. If you're doing
> physics experiments then maybe you need atomic clock
> accuracy. For most people, correcting a couple of minutes
> every once in awhile is plenty. No one's going to miss a
> doctor's appt over it. A lot of services are not necessary
> for most people, but W32Time is one that no one actually
> needs.


Fair enough but I wouldn't call it useless. Some machines can drift
a lot so it's usefull to have the time set automatically. On my Win2k
PC it's disabled and I manually query a time server when I feel like
setting the time. On my XP and 7 systems I let it run.

> Either way, my point was that if people look through
> their services list they'll probably see lots of things that
> they have no use for.


Yes, and it's something I always check when configuring a system.
Mayayana (12-05-18, 10:55 PM)
"Apd" <not> wrote

| > NTP? You mean W32Time?
|
| It's named NTP in your table of services

Not in mine. Maybe that's a recent change?
For some reason many things seem to disappear
from the full list when I disable them. But in
HKLM\System\CurrentControlSet\Services it's
called W32Time and there's nothing named NTP.
Apd (12-05-18, 11:44 PM)
"Mayayana" wrote:
> "Apd" wrote
> | > NTP? You mean W32Time?
> |
> | It's named NTP in your table of services
> Not in mine. Maybe that's a recent change?


I mean the table on your web page:

Service - Host - Description
ssdp - svchost - Service Discovery Protocol, for sharing hardware on network
ntp - svchost - Microsoft time check. Useless.
...etc.

This has reminded me to check the time on my W2k machine.
It was 2 minutes slow.

Similar Threads