Advertisement
3_2004-2005 System Services/ Functions #145540

An application to call the ShellExecute API

A very simple utility to allow you to call the ShellExecute API from the command line. 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:pjn@indigo.ie". 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. The zip file contains the ShelExec source code and a prebuilt version of ShelExec.

AI

KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Quellcode
original-source
Upload
Upload
Upload
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine