From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b97aa4480eccc494 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!fdn.fr!club-internet.fr!feedme-small.clubint.net!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How to get the application path Date: Wed, 25 Jul 2007 14:13:44 -0500 Organization: Jacob's private Usenet server Message-ID: References: <46a456aa$0$25908$426a34cc@news.free.fr> <1185204459.328520.240930@z24g2000prh.googlegroups.com> <1185288900.324049.237880@j4g2000prf.googlegroups.com> <5lr6mx6c7b.fsf@hod.lan.m-e-leypold.de> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1185390684 17158 69.95.181.76 (25 Jul 2007 19:11:24 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 25 Jul 2007 19:11:24 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Xref: g2news2.google.com comp.lang.ada:1183 Date: 2007-07-25T14:13:44-05:00 List-Id: "Markus E Leypold" wrote in message news:5lr6mx6c7b.fsf@hod.lan.m-e-leypold.de... > > > On Jul 24, 4:11 am, Stephen Leake > > wrote: > > > >> > I really have to question this. I tried it using GNAT on Linux, and > >> > (as I expected) Command_Name simply returns whatever was the first > >> > token I entered on the shell command line---i.e. argv[0] (which is > >> > what the Ada 95 manual hints that Command_Name should return). > >> > >> Yes, that is exactly what it does. > >> > >> I guess in the cases I use it, I always launch a program by specifying > >> its full path. > >> > >> That is typically the case for launching from an icon, for example. > > > > What's an icon? :) :) > > > > Seriously, I'm enougb of a dinosaur that I still use command lines for > > everything, most of the time. (Even on Windows.) I still think it's > > the coolest thing that I don't have to punch my commands onto > > Hollerith cards any more. > > I think thepoint is not that the OP wants icons. The problem is to > find the application's installation directory (where all other > spplication data is, often including configuration) when the > application has been started from e.g. a windows desktop. On Windows, you need to find that in the registry. The application path for configuration purposes is not necessarily the same as the path that it was launched from. Claw has a bunch of routines for setting and retriving the application path in the Claw.Registry.Shell package. Another way to say this is that it can't be done portably, at least if you are going to follow the OS "standards" for such things. Otherwise, you should just do it yourself and not worry about what the OS thinks. Randy.