ShelExec
v1.02
Welcome to ShelExec v1.01, A very
simple utility to allow you to call the ShellExecute API from the command line.
HISTORY:
V1.01 (16
July 1999)
V1.02 (9 April 2000)
- Fixed a bug where the verb "Open" was always
used.
- Program now understands a /Verb:Value command line
which allows the verb to be specified as used in the ShellExecute call. Not specifying
a verb will use the default value for the file as setup in the registry.
- Program now understands a /ShowCmd:Value command line
which allows the "nShowCmd" value to be specified as used
in the ShellExecute call. Not specifying a value will use the value SW_SHOW.
- Code now uses MFC internally.
- Code now supports UNICODE and
build configurations are provided
INSTALLATION
REQUIREMENTS:
- The program is for Win32 only
and has no external requirements on dlls other than the ones shipped as
standard with any Win32 platform.
USAGE:
- Places where you might find ShelExec useful
are in adding an Autorun.inf file to your CD-R / CD-RW Discs. For example
suppose you have a HTML page called index.htm on the root of your CD which
you would like to run automatically whenever the user inserts the CD. All
you need to do is put ShelExec.exe, some ico file and the index.htm files
into the root directory and create a autorun.inf file with the following
contents:
[autorun]
open=ShelExec.exe index.html
icon=youricon.ico
- Items that ShelExec can handle include any
file which is registered with the shell e.g. Word .Doc files, Text Files,
batch files etc etc. It can also handle URLS such as "http://somesite.com",
"ftp://www.microsoft.com" and "mailto:pjna@naughter.com".
- The more technically minded of you may say why is there
a need to have this program since you can use "start filename" on
autorun CD's without any apparent problems. The problem with this approach
is that it does not work on NT because on NT "start" is
implemented as an "Internal" command in cmd.exe (as opposed
to a standard exe on 95/98) with the upshot that your CD's will not AutoRun
on NT 4 or Windows 2000. Using ShelExec will mean that your CD's will
autorun on all OS's which support it.
CONTACTING
THE AUTHOR
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
9 April 2000