Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #11699 > unrolled thread

How to use Shell32.dll?

Started bybenyovszky.botond@gmail.com
First post2017-06-30 04:16 -0700
Last post2017-07-04 08:24 -0700
Articles 3 — 2 participants

Back to article view | Back to microsoft.public.scripting.vbscript


Contents

  How to use Shell32.dll? benyovszky.botond@gmail.com - 2017-06-30 04:16 -0700
    Re: How to use Shell32.dll? "Mayayana" <mayayana@invalid.nospam> - 2017-06-30 08:28 -0400
      Re: How to use Shell32.dll? benyovszky.botond@gmail.com - 2017-07-04 08:24 -0700

#11699 — How to use Shell32.dll?

Frombenyovszky.botond@gmail.com
Date2017-06-30 04:16 -0700
SubjectHow to use Shell32.dll?
Message-ID<a8130bd7-5320-48f2-83e4-eb6e0fb7280b@googlegroups.com>
I would like to call the SHChangeNotify function from Shell32.dll, but I couldn't find any source about it on the internet.

I would like to use it to send an SHCNE_DRIVEADD system message, so a special program could be tested easier.
I use a batch file to create or format a virtual pendrive, then I copy the necessary files on it. That's when I would like to make that program recheck the drives.

Could you help me out, if it can be done or not? And if yes, then how?

[toc] | [next] | [standalone]


#11700

From"Mayayana" <mayayana@invalid.nospam>
Date2017-06-30 08:28 -0400
Message-ID<oj5fvg$16e$1@dont-email.me>
In reply to#11699
<benyovszky.botond@gmail.com> wrote

|I would like to call the SHChangeNotify function from Shell32.dll, but I 
couldn't find any source about it on the internet.
|

   You can't do anything like that directly from script.
You'd have to write something like a COM library that
VBS can use.

   It might be possible to cause an update
by opening the "Computer" folder:

Dim ShAp
Set ShAp = CreateObject("Shell.Application")
ShAp.open 17
Set ShAp = Nothing 

[toc] | [prev] | [next] | [standalone]


#11701

Frombenyovszky.botond@gmail.com
Date2017-07-04 08:24 -0700
Message-ID<cf5a632e-e4b8-491a-b3c3-4aefce30a3e8@googlegroups.com>
In reply to#11700
Sadly it is very specific to trick that program. It needs that windows message, containing which drive has been removed/added. And the program would be useful only if it is a 1 file portable program to any other computer.
Probably I'll have to write a c++ program for it that uses cmd commands where it's necessary.
Thx for your help!

[toc] | [prev] | [standalone]


Back to top | Article view | microsoft.public.scripting.vbscript


csiph-web