Discussion:
Win98: Auto-Open Drive upon Insert?
(too old to reply)
Harry Potter
2017-09-18 23:13:23 UTC
Permalink
Now, Windows 98 has a feature to auto-start a program on a removable medium upon insert. I want to open a flash drive in Windows Explorer as in the Explore option once it's inserted into the computer. How do I implement this feature? Too bad I can't auto-run a floppy: it doesn't support auto-insert notification. :(
R.Wieser
2017-09-19 07:06:49 UTC
Permalink
Harry,
Post by Harry Potter
I want to open a flash drive in Windows Explorer as in the Explore option
once it's inserted into the computer
Google for "autorun.inf" and what features it offers.
Post by Harry Potter
How do I implement this feature?
First do your own work and read all you can find. If you than still have
*specific* questions I'll be glad to help. But not with this "tell me
*everything*" question of yours. :-(

Regards,
Rudy Wieser


-- Origional message:
"Harry Potter" <***@yahoo.com> wrote in message news:f9b6ee29-3f62-4581-b9ff-***@googlegroups.com...
Now, Windows 98 has a feature to auto-start a program on a removable medium
upon insert. I want to open a flash drive in Windows Explorer as in the
Explore option once it's inserted into the computer. How do I implement
this feature? Too bad I can't auto-run a floppy: it doesn't support
auto-insert notification. :(
Harry Potter
2017-09-20 11:51:06 UTC
Permalink
Post by R.Wieser
Harry,
Google for "autorun.inf" and what features it offers.
Thanks! :) Now, how do I open Windows Explorer in Explore mode?
R.Wieser
2017-09-20 12:01:04 UTC
Permalink
Harry,
Post by Harry Potter
Now, how do I open Windows Explorer in Explore mode?
Do you know how to open it in *any* other way ?

There are multiple ways to start a program. You could take a look at
CreateProcess.

Regards,
Rudy Wieser
Post by Harry Potter
Post by R.Wieser
Harry,
Google for "autorun.inf" and what features it offers.
Thanks! :) Now, how do I open Windows Explorer in Explore mode?
Harry Potter
2017-09-20 13:16:34 UTC
Permalink
Post by R.Wieser
Harry,
Post by Harry Potter
Now, how do I open Windows Explorer in Explore mode?
Do you know how to open it in *any* other way ?
I mean *with* the folders tree on the left open.
Post by R.Wieser
There are multiple ways to start a program. You could take a look at
CreateProcess.
What about from the command-line, as I want to run it from a script?
R.Wieser
2017-09-20 13:47:51 UTC
Permalink
Harry,
Post by Harry Potter
What about from the command-line, as I want to run it from a script?
Go for it ! :-)

And no, I'm not going to spend any time at (again!) guessing about what you
actually want, or where you might be needing it. You provide the needed
info for us/me to be able to figure out what you actually want and I'll see
if I can provide you with a usable answer. If not than I won't either.

And I suggest you re-read what you found for that "autorun.inf" file.

Regards,
Rudy Wieser
Post by Harry Potter
Post by R.Wieser
Harry,
Post by Harry Potter
Now, how do I open Windows Explorer in Explore mode?
Do you know how to open it in *any* other way ?
I mean *with* the folders tree on the left open.
Post by R.Wieser
There are multiple ways to start a program. You could take a look at
CreateProcess.
What about from the command-line, as I want to run it from a script?
Harry Potter
2017-09-20 23:17:26 UTC
Permalink
Post by R.Wieser
Harry,
Post by Harry Potter
What about from the command-line, as I want to run it from a script?
Go for it ! :-)
And no, I'm not going to spend any time at (again!) guessing about what you
actually want, or where you might be needing it. You provide the needed
info for us/me to be able to figure out what you actually want and I'll see
if I can provide you with a usable answer. If not than I won't either.
And I suggest you re-read what you found for that "autorun.inf" file.
I mean if I want to run Explorer from the Run... dialog or a batch file. I want to auto-boot the Explorer upon insertion of a flash drive and have displayed the folder tree. I am sorry for any confusion. :(
R.Wieser
2017-09-21 07:37:37 UTC
Permalink
Harry,
Post by Harry Potter
I mean if I want to run Explorer from the Run... dialog or a batch file
How do you normally run a program from the commandline or from within a
batchfile ? Why have you not god-damn-it *TRIED* it before posting ?
You *know* how its done, and you *still* behave like a complete clueless
person. Not funny. Not funny *at all*.
Post by Harry Potter
I want to and
have displayed the folder tree.
You already said that. But you've not mentioned what the problem is (and
no, a "how do I ..." is *not* a problem description), or what you already
tried. And no, I'm not anymore going to spend energy at trying to
second-guess what that either of those might be, or, even worse, waste a
*lot* of energy at trying to explain *everything*.

In short: If you do not put effort into trying to help us understand your
current problem, I won't put effort into helping you either. Thats the
deal, take it or leave it.


Heck, at this moment I am not even sure if that "auto-boot the Explorer upon
insertion of a flash drive" is supposed to be an effect of the stick itself,
regardless of which 'puter its inserted in, or should be an effect of the
computer, regardless of the stick thats inserted. :-( And yes, both are
as valid.

And although I'm sure you will be able to answer this with a very short
sentence, the problem is that *I* (we) have to make you (again and again)
aware of such a difference, in effect making us pulling every bit of
relevant information outof you. And that is tiresome, *very* tiresome. Its
also the reason that, although I read your questions, I seldom respond to
them anymore.

And seeing how I again/still have to do that, I probably won't try to answer
another one for a few months or so.

Regards,
Rudy Wieser
Post by Harry Potter
Post by R.Wieser
Harry,
Post by Harry Potter
What about from the command-line, as I want to run it from a script?
Go for it ! :-)
And no, I'm not going to spend any time at (again!) guessing about what you
actually want, or where you might be needing it. You provide the needed
info for us/me to be able to figure out what you actually want and I'll see
if I can provide you with a usable answer. If not than I won't either.
And I suggest you re-read what you found for that "autorun.inf" file.
I mean if I want to run Explorer from the Run... dialog or a batch file.
I want to auto-boot the Explorer upon insertion of a flash drive and have
displayed the folder tree. I am sorry for any confusion. :(
Harry Potter
2017-09-21 17:59:08 UTC
Permalink
I want to run Windows Explorer from the command line or Run... dialog box. What command do I need to run it? C:\Windows\Explore.exe? What are the switches available?
Kaz Kylheku
2017-09-21 18:22:42 UTC
Permalink
Post by Harry Potter
I want to run Windows Explorer from the command line or Run... dialog
box. What command do I need to run it? C:\Windows\Explore.exe? What
are the switches available?
LMGTFY
R.Wieser
2017-09-21 18:30:49 UTC
Permalink
Harry,
Post by Harry Potter
I want to run Windows Explorer from the command line or Run... dialog box.
And you need to know that ... why exactly ? It hasn't got anything to do
with your subject line, so you better explain.
Post by Harry Potter
What command do I need to run it? C:\Windows\Explore.exe?
And again you're showing that you rather want to be lazy to a *big* fault,
than to lift a single finger yourself.

You see, if you would have tried it you would already known the answer, in
10 seconds or less. And that means that I for one am definitily *not*
going to give/spoon-feed it to you.

You do not want to spend some time on trying to solve your own problems ?
Than I'm definitily not the one who's going to make up for that. No sirree.
Post by Harry Potter
What are the switches available?
Two easy words into google, and you would already have know. The same as
the above goes here: If you do not want to put any effort in finding it
yourself, than neither am I.

Good luck with trying to get other people to do all the work for you. :-)

Regards,
Rudy Wieser
Post by Harry Potter
I want to run Windows Explorer from the command line or Run... dialog box.
What command do I need to run it? C:\Windows\Explore.exe? What are the
switches available?
Harry Potter
2017-09-21 20:37:08 UTC
Permalink
I Googled it. Found it! And I found autorun.inf information, also.
R.Wieser
2017-09-22 06:45:26 UTC
Permalink
Harry,
Post by Harry Potter
I Googled it. Found it! And I found autorun.inf information, also.
Very good ! It wasn't all that hard or difficult, wasn't it ?

Now all you need to try to remember is to google first and ask later, not
the other way around. :-)

Regards,
Rudy Wieser
Post by Harry Potter
I Googled it. Found it! And I found autorun.inf information, also.
Harry Potter
2017-09-22 13:05:51 UTC
Permalink
Post by R.Wieser
Harry,
Very good ! It wasn't all that hard or difficult, wasn't it ?
No. :)
Post by R.Wieser
Now all you need to try to remember is to google first and ask later, not
the other way around. :-)
You're right. Sorry! :(
Harry Potter
2017-10-05 22:54:54 UTC
Permalink
Uhh...is there a way to have Win98SE open a disk in Explorer upon insert? It would save a mess of work on each flash drive. :)
R.Wieser
2017-10-06 07:49:55 UTC
Permalink
Harry,
Post by Harry Potter
Uhh...is there a way to have Win98SE open a disk in Explorer upon insert?
I'm not aware of a build-in (user facing) method, but you could take a look
at the WM_DEVICECHANGE event. You would need to build your own program
around it though.

Regards,
Rudy Wieser
Post by Harry Potter
Uhh...is there a way to have Win98SE open a disk in Explorer upon insert?
It would save a mess of work on each flash drive. :)
JJ
2017-09-20 14:50:27 UTC
Permalink
Post by Harry Potter
Post by R.Wieser
Harry,
Google for "autorun.inf" and what features it offers.
Thanks! :) Now, how do I open Windows Explorer in Explore mode?
It's described in KB152457.
JJ
2017-09-19 16:06:02 UTC
Permalink
Post by Harry Potter
Now, Windows 98 has a feature to auto-start a program on a removable
medium upon insert. I want to open a flash drive in Windows Explorer as
in the Explore option once it's inserted into the computer. How do I
implement this feature? Too bad I can't auto-run a floppy: it doesn't
support auto-insert notification. :(
Start by listening to the WM_DEVICECHANGE window message.

For drives which don't support auto insert notification, do manual periodic
check on them.
Kaz Kylheku
2017-09-19 18:05:12 UTC
Permalink
Post by JJ
Post by Harry Potter
Now, Windows 98 has a feature to auto-start a program on a removable
medium upon insert. I want to open a flash drive in Windows Explorer as
in the Explore option once it's inserted into the computer. How do I
implement this feature? Too bad I can't auto-run a floppy: it doesn't
support auto-insert notification. :(
Start by listening to the WM_DEVICECHANGE window message.
For drives which don't support auto insert notification, do manual periodic
check on them.
If the drive doesn't support that, how does the program launch?

I suspect what Harry Potter wants is an autorun program which detects
which drive it was run from and then explores it.

I think the solution might have the following structure:

1. The program which is autorun uses the GetModuleHandle
and GetModuleFilename API's to discover its own path.

2. The program extracts the drive letter from its path.

3. The program uses ShellExecute or ShellExecuteEx to launch
a Windows Explorer window on "<drive-letter>:\"

Or something like that.
R.Wieser
2017-09-19 18:25:43 UTC
Permalink
Kaz,
Post by Kaz Kylheku
Post by JJ
For drives which don't support auto insert notification, do manual periodic
check on them.
If the drive doesn't support that, how does the program launch?
And there we are, cosily around the campfire, second-guessing what harry
might be out for. :-) :-(((

I took it he ment that the auto insert notification is working, but he does
not know what to do with it.

JJ thinks the OS doesn't generate notifications, and suggests to
write-and-install a program which emulates it

You think pretty-much the same as I do, but than seem to be thinking about
how a program started by such a notification will be able to know its own
start-path/drive (which is painfully easy to do actually)

Shell we bitch among ourselves, wasting time and energy, or shall we instead
wait untill harry here clarifies what he actually is looking for ? As all
we have is one (badly put) question, and already three possible explanations
of it ...

Regards,
Rudy Wieser
Post by Kaz Kylheku
Post by JJ
Post by Harry Potter
Now, Windows 98 has a feature to auto-start a program on a removable
medium upon insert. I want to open a flash drive in Windows Explorer as
in the Explore option once it's inserted into the computer. How do I
implement this feature? Too bad I can't auto-run a floppy: it doesn't
support auto-insert notification. :(
Start by listening to the WM_DEVICECHANGE window message.
For drives which don't support auto insert notification, do manual periodic
check on them.
If the drive doesn't support that, how does the program launch?
I suspect what Harry Potter wants is an autorun program which detects
which drive it was run from and then explores it.
1. The program which is autorun uses the GetModuleHandle
and GetModuleFilename API's to discover its own path.
2. The program extracts the drive letter from its path.
3. The program uses ShellExecute or ShellExecuteEx to launch
a Windows Explorer window on "<drive-letter>:\"
Or something like that.
Loading...