element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) Use the .com extension for the command line executable on Windows
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 4 replies
  • Subscribers 180 subscribers
  • Views 976 views
  • Users 0 members are here
Related

Use the .com extension for the command line executable on Windows

Former Member
Former Member over 13 years ago

A usual problem when compiling programs on Windows is that GUI executables cannot write to the command line from which they are started. To do that you have to compile them as Console executables, but then there is always an annoying command line window poping up when running it from a shortcut.

 

The solution is to ship two executables, one compiled as GUI, one as Console, and that is what Eagle is doing. The GUI executable is eagle.exe, and the Console executable is eaglecon.exe.

 

An informal convention when using that dual executable solution is to use the same base name for the two files, but using the .com extension for the Console executable. This has the advantage that you only have a single name to document and remember ("eagle"), but thanks to the default order of extensions in the Pathext environment variables, eagle.com has priority over eagle.exe when run from a command line (and one can still explicitly run the GUI version by typing "eagle.exe"). In shortcuts the full path to the .exe is necessary anyway, so it's not a problem to have a "conflicting" .com file. This convention is used for example by the Microsoft Visual Studio IDE (devenv.exe for shortcuts, devenv.com for command line use and scripting), or the Inkscape open source vector graphics editor (inkscape.exe for shortcuts, inkscape.com for command line use and scripting).

 

My suggestion is then to simply rename the file "eaglecon.exe" to "eagle.com".

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 13 years ago

    Jérôme Vuarand wrote on Wed, 01 August 2012 12:50

    An informal convention when using that dual executable solution is to

    use the same base name for the two files, but using the .com extension

    for the Console executable.

     

    There is no such convention.  Furthermore, the file name suffix ".com"

    already has a specific meaning.

     

    Quote:

    My suggestion is then to simply rename the file "eaglecon.exe" to

    "eagle.com".

     

    Really bad idea.

     

    Some other convention could be used though.  For example, I add "_w" to GUI

    executables, like myprog.exe for the command line and myprog_w.exe for the

    window version.  You want the command line version to be the simple name

    since you have to type it.  The GUI version can be more convoluted since it

    is generally run from a menu item with the actual executable name hidden

    from the user.

     

    The Eagle convention is fine too.  The point is there is no standard, just

    various things people have done.  There is also little need for one.  There

    is no problem to solve here.  Let's move along and stop diverting the

    developer's attention on frivolous issues like this.

     

    --

    Web access to CadSoft support forums at www.eaglecentral.ca.  Where the CadSoft EAGLE community meets.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • CSWalt
    CSWalt over 13 years ago in reply to Former Member

    Hi,

     

    On 08/01/12 19:08, Olin Lathrop wrote:

    Jérôme Vuarand wrote on Wed, 01 August 2012 12:50

    >> An informal convention when using that dual executable solution is to

    >> use the same base name for the two files, but using the .com extension

    >> for the Console executable.

     

    There is no such convention.  Furthermore, the file name suffix ".com"

    already has a specific meaning.

     

    Quote:

    >> My suggestion is then to simply rename the file "eaglecon.exe" to

    >> "eagle.com".

     

    Really bad idea.

     

    Some other convention could be used though.  For example, I add "_w" to GUI

    executables, like myprog.exe for the command line and myprog_w.exe for the

    window version.  You want the command line version to be the simple name

    since you have to type it.  The GUI version can be more convoluted since it

    is generally run from a menu item with the actual executable name hidden

    from the user.

     

    The Eagle convention is fine too.  The point is there is no standard, just

    various things people have done.  There is also little need for one.  There

    is no problem to solve here.  Let's move along and stop diverting the

    developer's attention on frivolous issues like this.

     

    I agree. It's difficult to make everybody happy on questions like this.

    As long there is no real need to change that we keep it.

     

    Regards,

    Walter Spermann

     

     

    --

    -


    Walter Spermann

    Softwareentwicklung

    CadSoft Computer GmbH

    Pleidolfweg 15

    84568 Pleiskirchen

    Tel.: 08635/6989-10

    www.cadsoft.de

    -


    Registergericht: Amtsgericht Traunstein HRB 5573

    Geschäftsführer: Thomas Liratsch

    -


     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • CSWalt
    CSWalt over 13 years ago in reply to Former Member

    Hi,

     

    On 08/01/12 19:08, Olin Lathrop wrote:

    Jérôme Vuarand wrote on Wed, 01 August 2012 12:50

    >> An informal convention when using that dual executable solution is to

    >> use the same base name for the two files, but using the .com extension

    >> for the Console executable.

     

    There is no such convention.  Furthermore, the file name suffix ".com"

    already has a specific meaning.

     

    Quote:

    >> My suggestion is then to simply rename the file "eaglecon.exe" to

    >> "eagle.com".

     

    Really bad idea.

     

    Some other convention could be used though.  For example, I add "_w" to GUI

    executables, like myprog.exe for the command line and myprog_w.exe for the

    window version.  You want the command line version to be the simple name

    since you have to type it.  The GUI version can be more convoluted since it

    is generally run from a menu item with the actual executable name hidden

    from the user.

     

    The Eagle convention is fine too.  The point is there is no standard, just

    various things people have done.  There is also little need for one.  There

    is no problem to solve here.  Let's move along and stop diverting the

    developer's attention on frivolous issues like this.

     

    I agree. It's difficult to make everybody happy on questions like this.

    As long there is no real need to change that we keep it.

     

    Regards,

    Walter Spermann

     

     

    --

    -


    Walter Spermann

    Softwareentwicklung

    CadSoft Computer GmbH

    Pleidolfweg 15

    84568 Pleiskirchen

    Tel.: 08635/6989-10

    www.cadsoft.de

    -


    Registergericht: Amtsgericht Traunstein HRB 5573

    Geschäftsführer: Thomas Liratsch

    -


     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube