5,317,598 members and growing! (24,259 online)
Email Password   helpLost your password?
General Reading » Hardware & System » General     Intermediate

ShelExec v1.01 - Executing Shell Commands

By PJ Naughter

A freeware utility to call the ShellExecute API
VC6, C++Windows, NT4, MFC, Visual Studio, Dev

Posted: 3 Mar 2000
Updated: 3 Mar 2000
Views: 106,577
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
18 votes for this Article.
Popularity: 4.28 Rating: 3.41 out of 5
2 votes, 22.2%
1
1 vote, 11.1%
2
2 votes, 22.2%
3
2 votes, 22.2%
4
2 votes, 22.2%
5
  • Download source files - 27 Kb
  • Introduction

    Welcome to ShelExec v1.01, A very simple utility to allow you to call the ShellExecute API from the command line.


    History
    Installation Requirements
    Usage
    Contacting the Author


    History

    V1.01 (16 July 1999)
    • Initial public release.


    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: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.


    Contacting the Author

    PJ Naughter
    Email: pjn@indigo..ie
    Web: http://www.naughter.com
    16 July 1999


    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    About the Author

    PJ Naughter



    Location: United States United States

    Other popular Hardware & System articles:

    Article Top
    Sign Up to vote for this article
    You must Sign In to use this message board.
    FAQ FAQ Noise ToleranceSearch Search Messages 
     Layout  Per page   
     Msgs 1 to 17 of 17 (Total in Forum: 17) (Refresh)FirstPrevNext
    Subject  Author Date 
    Generalcreating a shell that supports internal commands such asmemberTshilidzi10:47 27 May '08  
    QuestionHow can i programe to make an autorun CD with password with C++memberAlloch3:21 20 Jul '06  
    GeneralAutorun Browser in full Screen ModesussAnonymous9:53 5 Oct '04  
    GeneralRe: Autorun Browser in full Screen Modememberpjnaughter13:51 5 Oct '04  
    GeneralNTDETEC.commemberSadru20:46 27 May '03  
    GeneralThanks, How can i launch the DUN entry dialog in vc programmemberFayeGolf20:52 3 Feb '02  
    GeneralUseful with PHP on Win32 platformsussGuy N. Hurst22:41 8 Apr '00  
    GeneralProblems with threadssussMarkus Loibl1:48 5 Apr '00  
    GeneralRe: Problems with threadssussPJ Naughter12:58 5 Apr '00  
    GeneralRe: Problems with threadssussMarkus Loibl22:17 5 Apr '00  
    GeneralRe: Problems with threadsmemberYan11:09 11 Jan '01  
    Generalfail if default-verb is not "open"sussMarkus Loibl1:44 5 Apr '00  
    GeneralRe: fail if default-verb is not sussPJ Naughter12:54 5 Apr '00  
    GeneralRe: fail if default-verb is not sussPJ Naughter14:09 9 Apr '00  
    GeneralOther verbssussMatthew Ellis3:36 15 Mar '00  
    GeneralRe: Other verbssussPJ Naughter12:56 5 Apr '00  
    GeneralRe: Other verbssussPJ Naughter14:10 9 Apr '00  

    General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    PermaLink | Privacy | Terms of Use
    Last Updated: 3 Mar 2000
    Editor: Valerie Bradley
    Copyright 2000 by PJ Naughter
    Everything else Copyright © CodeProject, 1999-2008
    Web18 | Advertise on the Code Project